#34960: Document how to set nulls_last=True for admin_order_field/ordering
-----------------------------------------+------------------------
Reporter: Petr DlouhĂ˝ | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Django in https://code.djangoproject.com/ticket/30981 added possibility to
set `nulls_last=True` for field ordering in `ModelAdmin` as:
{{{
my_model_admin.admin_order_field = F('field').desc(nulls_last=True)
}}}
or
{{{
@admin.display(ordering=F('field').desc(nulls_last=True))
}}}
but I can't any mention of it at
https://docs.djangoproject.com/en/4.2/ref/contrib/admin/.
In fact I had to find the original issue I report it to set this up
correctly.
Would it be possible to mention all possible values of
admin_order_field/ordering in the documentation?
--
Ticket URL: <https://code.djangoproject.com/ticket/34960>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018bb37bb546-4618d59f-ea5b-49cc-bfd8-9b5feae61821-000000%40eu-central-1.amazonses.com.