#19084: Allow sorting by PK in admin
-------------------------------+--------------------------------------
     Reporter:  coolRR         |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  closed
    Component:  contrib.admin  |                  Version:
     Severity:  Normal         |               Resolution:  wontfix
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 `pk` is a property on model instances, not a model field.

 To enable sorting, we'd have to somehow set `pk.admin_order_field` to the
 `_meta.pk.attname`. I don't see how to achieve that — especially since
 core shouldn't contain code for contrib apps such as the admin.

 Just use the real model field!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19084#comment:1>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to