Code

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#17269 closed Cleanup/optimization (fixed)

Fix model options docs with regard to admin multi-sort

Reported by: sebastian Owned by: nobody
Component: Documentation Version: master
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 2 years ago.
r17129-admin-multi-sort-in-options-inline.diff (873 bytes) - added by sebastian 2 years ago.

Download all attachments as: .zip

Change History (8)

Changed 2 years ago by sebastian

comment:1 Changed 2 years ago by krzysiumed

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by krzysiumed

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

comment:3 Changed 2 years ago by krzysiumed

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 Changed 2 years ago by sebastian

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.

Changed 2 years ago by sebastian

comment:5 Changed 2 years ago by julien

  • Resolution set to fixed
  • Status changed from new to closed

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 Changed 2 years ago by krzysiumed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.