Opened 3 years ago

Closed 3 years ago

#33067 closed Cleanup/optimization (fixed)

Acknowledge existence of verbatim template tag in templatetag documentation

Reported by: Chris Jerdonek Owned by: Muhammad Hammad
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, the documentation for the templatetag template tag says that you "must" use templatetag in order to display one of the syntax characters used to compose template tags:

Since the template system has no concept of “escaping”, to display one of the bits used in template tags, you must use the {% templatetag %} tag.

However, this doesn't seem to acknowledge that the verbatim tag also lets you do this. Thus, I would suggest rephrasing to something like--

The template system has no concept of “escaping” individual characters. However, you can use the {% templatetag %} tag to display one of the bits used in template tags.

I would also include a sentence at the end that reads something like--

See also the verbatim tag for another way of including these characters.

By the way, I think the "Sample usage" example in the templatetag docs might be better served by verbatim since it is a longer string with two literal bits. I think the example for templatetag might be better if it showed an isolated occurrence that doesn't have a matching pair.

Change History (5)

comment:1 by Mariusz Felisiak, 3 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Muhammad Hammad, 3 years ago

Owner: changed from nobody to Muhammad Hammad
Status: newassigned

comment:3 by Mariusz Felisiak, 3 years ago

Has patch: set
Patch needs improvement: set

comment:4 by Mariusz Felisiak, 3 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In f1d2d26:

Fixed #33067 -- Improved templatetag docs.

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