Opened 19 years ago
Closed 18 years ago
#3742 closed (duplicate)
Function with `admin_order_field` only sorts in one direction, with no arrows
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | contrib.admin | Version: | 0.96 |
| Severity: | Keywords: | admin admin_order_field | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When using admin_order_field on a function, it can only be sorted in one direction (ascending), and no arrows will be displayed when sorted.
my_function.admin_order_field = 'model_field'
This will result in the column showing up correctly, and it is a link which sorts, but it does not work, as described above.
Attachments (1)
Change History (4)
by , 19 years ago
| Attachment: | admin_order_fields_desc.diff added |
|---|
comment:1 by , 19 years ago
| Has patch: | set |
|---|
Added a patch which I think fixes the problem, which is basically that the last case is comparing field_name to the current sort field; for sortable non-fields it will be admin_order_field and not field_name.
comment:3 by , 18 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Is this still an issue? #3397 seems to have been re-opened and fixed multiple times to resolve issues with admin_order_field, so I'm going to close out as a duplicate. Re-open #3397 if you're still seeing problems (though at this point I don't think we'll be doing too much to the deprecated admin app).
Bidirectional change list sorting for sortable non-fields