#16939: Inaccurate implementation of {% comment %} presented in custom template
tag
'howto' guide
-------------------------------+------------------------------------
Reporter: julien | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by sebastian):
* has_patch: 0 => 1
Comment:
Here is an attempt at updating the documentation. It still keeps the
actual `{% comment %}` example since I think it's still valid, but adds a
note highlighting the differences to the actual implementation.
I still like the simplified `{% comment %}` example because it leads to
the more elaborate `{% upper %}` tag in the following section. First we
parse the node list but simply ignore it, later we actually use it and run
a transformation on it.
Coming up with a completely new introductory example seems not necessary,
and with the note regarding the actual implementation of `{% comment %}`
it should be clear that this is only an example, usually one would still
use the standard `{% comment %}` tag for actually commenting out template
code.
(The note has the added effect of introducing `parser.skip_past()` which I
wasn't aware of until now. – Slightly unrelated, the patch also fixes a
missing period in the single-sentence documentation of the actual `{%
comment %}` tag.)
--
Ticket URL: <https://code.djangoproject.com/ticket/16939#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.