Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16793 closed Cleanup/optimization (fixed)

consolidate and/or cross reference documentation on {% load %} template tag

Reported by: tobias Owned by: bluejeansummer
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The {% load %} template tag is documented in at least 3 places, and 2 of them do not mention the {% load foo from bar %} syntax that was introduced in 1.3. This documentation can probably be consolidated (and/or spruced up with cross links) to make the from syntax easier to find.

The 3 locations are:

https://docs.djangoproject.com/en/dev/topics/templates/#custom-tag-and-filter-libraries

https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#code-layout

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#load

Attachments (1)

load_tag_linking.diff (1.5 KB) - added by bluejeansummer 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by gabrielhurley

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

Agreed on the linking. I don't think any de-duplication is necessary since they're all discussing different topics. For the three docs as listed:

  1. In the sentence "In the above, the load tag loads the comments tag library, which then makes the comment_form tag" all of those code bits should be cross-refs.
  1. The howto can include a cross-ref "for more information on load..." in the "behind the scenes" box below.
  1. This is the appropriate canonical place for a full reference and should be linked to from anywhere else.

That should take care of it.

comment:2 Changed 3 years ago by bluejeansummer

  • Owner changed from nobody to bluejeansummer
  • Status changed from new to assigned

Changed 3 years ago by bluejeansummer

comment:3 Changed 3 years ago by bluejeansummer

  • Has patch set

comment:4 Changed 3 years ago by Alex

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

In [16774]:

Fixed #16793. Added more cross referencing to the load tag's documentation. Thanks to bluejeansummer for the patch.

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.