mirror of
https://github.com/django/django.git
synced 2025-07-05 10:19:20 +00:00
[1.3.X] Fixed #16904 -- Additional clarification regarding contrib.messages iteration. Thanks murphyke for the report and patch.
Backport of [16866] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
add0628528
commit
3606f1f7b2
@ -210,6 +210,10 @@ If you're using the context processor, your template should be rendered with a
|
|||||||
``RequestContext``. Otherwise, ensure ``messages`` is available to
|
``RequestContext``. Otherwise, ensure ``messages`` is available to
|
||||||
the template context.
|
the template context.
|
||||||
|
|
||||||
|
Even if you know there is only just one message, you should still iterate over
|
||||||
|
the ``messages`` sequence, because otherwise the message storage will not be cleared
|
||||||
|
for the next request.
|
||||||
|
|
||||||
Creating custom message levels
|
Creating custom message levels
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user