Fixed #16904 -- Additional clarification regarding contrib.messages iteration. Thanks murphyke for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16866 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Simon Meers 2011-09-21 22:43:41 +00:00
parent e6088dce98
commit cfadc36be5
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ If you're using the context processor, your template should be rendered with a
``RequestContext``. Otherwise, ensure ``messages`` is available to
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
------------------------------