Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#17269 closed Cleanup/optimization (fixed)

Fix model options docs with regard to admin multi-sort

Reported by: Sebastian Goll Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords: docs, multi-sort, admin, model, options
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Since the recent introduction of the admin multi-sort addition, contrib.admin respects all fields specified on a model's ordering option. The docs should be updated to reflect this.

Changeset [16316] added a corresponding notice to the admin docs and the release changes, but missed the explicit note regarding this in the model options documentation.

The attached patch fixes this by updating that documentation as well.

Attachments (2)

r17127-admin-multi-sort-in-options.diff (869 bytes ) - added by Sebastian Goll 13 years ago.
r17129-admin-multi-sort-in-options-inline.diff (873 bytes ) - added by Sebastian Goll 13 years ago.

Download all attachments as: .zip

Change History (8)

by Sebastian Goll, 13 years ago

comment:1 by Christopher Medrela, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Christopher Medrela, 13 years ago

sebastian, please run 'svn diff' command when you are in main directory of django (parent of 'docs' directory).

comment:3 by Christopher Medrela, 13 years ago

And use

    .. versionchanged:: 1.4
       The Django admin honors all elements in the list/tuple ...

instead of

    .. versionchanged:: 1.4

       The Django admin honors all elements in the list/tuple ...

please.

comment:4 by Sebastian Goll, 13 years ago

krzysiumed, I'm confused. I did, in fact, run svn diff from the root, as the file name in the patch indicates: docs/ref/models/options.txt. Just to double-check, I re-ran it and now I'm 100 % certain that I did indeed run it from the root (i.e. trunk), as it reproduces the exact same patch file. What's wrong with the file I attached?

Regarding the inline vs. block issue with versionchanged – is there a consensus as to when to inline the change comment? About half of the versionchanged comments in the current docs are inlined, the other half is blocked. (In fact, the corresponding section in [16316] uses the block notation in docs/ref/contrib/admin/index.txt.)

Anyway, I'm attaching an updated patch with the versionchanged note inlined. This time I'm 100 % certain that I did run svn diff from the root directory, i.e. parent of docs.

comment:5 by Julien Phalip, 13 years ago

Resolution: fixed
Status: newclosed

In [17130]:

Fixed #17269 -- Corrected the model options doc to indicate that, since 1.4, all fields in Meta.ordering are honored by the admin. Thanks to sebastian for the report and patch.

comment:6 by Christopher Medrela, 13 years ago

sebastian, you're right, sorry for confusion. I thought it was launched in docs directory because git couldn't apply your patch when i was in my root directory, but it could in docs directory. I didn't know git requires some flags to apply correctly difference produced by svn.

According to inline vs block, you're right, there is no consensus. I didn't look carefully at docs and i thought there are only inlined versionchanged comments. Sorry for the mess, i will write comments more carefully and in more polite way.

Note: See TracTickets for help on using tickets.
Back to Top