这个django应用程序向django框架提供类似rails的flash消息。
django-flashcookie的Python项目详细描述
示例:
views.py
def some_action(request): ... request.flash['error'] = "You can't post comments in this section" return HttpReponseRedirect("/")
base.html
{% if flash %} {% for message in flash.error %} {{ message }} {% endfor %} {% endif %}
下载:
hg clone http://bitbucket.org/offline/django-flashcookie/