[Django] #23499: Error in built-in template tag "now" documentation

2 views
Skip to first unread message

Django

unread,
Sep 16, 2014, 11:08:55 PM9/16/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------
Reporter: JDougherty | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
The [documentation for the built-in `now` template
tag](https://docs.djangoproject.com/en/dev/ref/templates/builtins/) says
the following:


Note that you can backslash-escape a format string if you want to use
the “raw” value. In this example, “f” is backslash-escaped, because
otherwise “f” is a format string that displays the time. '''The “o”
doesn’t need to be escaped, because it’s not a format character:'''

{{{
It is the {% now "jS o\f F" %}
}}}

Emphasis mine. This is incorrect. Per the [`date` tag
documentation](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std
:templatefilter-date), the "o" is a format character. I have verified that
"o" does require a backslash when using `now` template tag in testing.

--
Ticket URL: <https://code.djangoproject.com/ticket/23499>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 16, 2014, 11:14:44 PM9/16/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Uncategorized | Status: assigned
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by JDougherty):

* owner: nobody => JDougherty
* needs_better_patch: => 0
* status: new => assigned
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:1>

Django

unread,
Sep 16, 2014, 11:22:09 PM9/16/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: assigned
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by bmispelon):

* type: Uncategorized => Bug
* stage: Unreviewed => Accepted


Comment:

Hi,

You're absolutely correct. It seems this was overlooked when the `o`
format was added in a6b6c6e17129379fa1f9ffce1ed7eaaa5d6f1127.

Thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:2>

Django

unread,
Sep 16, 2014, 11:34:14 PM9/16/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: assigned
Component: Documentation | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by JDougherty):

* has_patch: 0 => 1


Comment:

Fix is available in the `ticket_23499` branch of my repo on github:
https://github.com/JDougherty/django/tree/ticket_23499

However, I feel that since there are now two backslash-escaped characters
in the example, the description is a bit wordy.

I can either leave as is, attempt to rephrase, or try to come up with a
different example where only one backslash would be required.

Should I hold off on the pull request? Please advise, thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:3>

Django

unread,
Sep 16, 2014, 11:47:26 PM9/16/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: assigned
Component: Documentation | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by bmispelon):

Personally i don't think the modified version is too wordy so you can go
ahead and create the pull request.

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:4>

Django

unread,
Sep 16, 2014, 11:52:38 PM9/16/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: assigned
Component: Documentation | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by JDougherty):

Pull request created:
https://github.com/django/django/pull/3228


Thank you for the help, bmispelon.

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:5>

Django

unread,
Sep 17, 2014, 3:22:55 AM9/17/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: closed
Component: Documentation | Version: 1.7
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Baptiste Mispelon <bmispelon@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ab8248361e0a7b4fc7684eaaa5891e16b8562683"]:
{{{
#!CommitTicketReference repository=""
revision="ab8248361e0a7b4fc7684eaaa5891e16b8562683"
Fixed #23499 -- Error in built-in template tag "now" documentation
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:6>

Django

unread,
Sep 17, 2014, 3:28:15 AM9/17/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: closed
Component: Documentation | Version: 1.7

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Baptiste Mispelon <bmispelon@…>):

In [changeset:"722516536e0dd99690ab6df4c27bbceb29df4d5b"]:
{{{
#!CommitTicketReference repository=""
revision="722516536e0dd99690ab6df4c27bbceb29df4d5b"
[1.7.x] Fixed #23499 -- Error in built-in template tag "now" documentation

Backport of ab8248361e0a7b4fc7684eaaa5891e16b8562683 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:7>

Django

unread,
Sep 17, 2014, 3:28:17 AM9/17/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: closed
Component: Documentation | Version: 1.7

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Baptiste Mispelon <bmispelon@…>):

In [changeset:"3132edae41dbb13b924e98e8f0254e847155a050"]:
{{{
#!CommitTicketReference repository=""
revision="3132edae41dbb13b924e98e8f0254e847155a050"
[1.4.x] Fixed #23499 -- Error in built-in template tag "now" documentation

Backport of ab8248361e0a7b4fc7684eaaa5891e16b8562683 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:8>

Django

unread,
Sep 17, 2014, 3:28:20 AM9/17/14
to django-...@googlegroups.com
#23499: Error in built-in template tag "now" documentation
-------------------------------+--------------------------------------
Reporter: JDougherty | Owner: JDougherty
Type: Bug | Status: closed
Component: Documentation | Version: 1.7

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Baptiste Mispelon <bmispelon@…>):

In [changeset:"9a66244bd8c8b7202ff51f4aa6069f716ab64317"]:
{{{
#!CommitTicketReference repository=""
revision="9a66244bd8c8b7202ff51f4aa6069f716ab64317"
[1.6.x] Fixed #23499 -- Error in built-in template tag "now" documentation

Backport of ab8248361e0a7b4fc7684eaaa5891e16b8562683 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23499#comment:9>

Reply all
Reply to author
Forward
0 new messages