Skip to content

Commit

Permalink
[2.2.x] Fixed datetime string format examples in docs/howto/custom-te…
Browse files Browse the repository at this point in the history
…mplate-tags.txt.

Backport of f011d9e from master
  • Loading branch information
alex authored and felixxm committed May 22, 2019
1 parent 83605a1 commit a7515c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/howto/custom-template-tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ Here's how you'd use this new version of the tag:

.. code-block:: html+django

{% current_time "%Y-%M-%d %I:%M %p" %}<p>The time is {{ current_time }}.</p>
{% current_time "%Y-%m-%d %I:%M %p" %}<p>The time is {{ current_time }}.</p>

.. admonition:: Variable scope in context

Expand All @@ -1032,7 +1032,7 @@ like so:

.. code-block:: html+django

{% current_time "%Y-%M-%d %I:%M %p" as my_current_time %}
{% current_time "%Y-%m-%d %I:%M %p" as my_current_time %}
<p>The current time is {{ my_current_time }}.</p>

To do that, you'll need to refactor both the compilation function and ``Node``
Expand Down

0 comments on commit a7515c3

Please sign in to comment.