Django message doesn't expire

Posted by ninja123 on Stack Overflow See other posts from Stack Overflow or by ninja123
Published on 2010-06-09T13:09:01Z Indexed on 2010/06/09 13:12 UTC
Read the original article Hit count: 352

Filed under:
|
|
|
|

My code in the view:

   from django.contrib import messages
   messages.add_message(request, messages.INFO, 'Hello world.')

I don't want to show this code to the user the second time if he/she refreshes again. How do I go about doing that? Messages don't seem to have any sort of expiry setting. There is documentation here:

http://docs.djangoproject.com/en/1.2/ref/contrib/messages/#expiration-of-messages

© Stack Overflow or respective owner

Related posts about python

Related posts about django