Questions tagged [django-messages]

Notification messages framework for Django

The messages framework

Quite commonly in web applications, you need to display a one-time notification message (also known as “flash message”) to the user after processing a form or some other types of user input.

For this, Django provides full support for cookie- and session-based messaging, for both anonymous and authenticated users. The messages framework allows you to temporarily store messages in one request and retrieve them for display in a subsequent request (usually the next one). Every message is tagged with a specific level that determines its priority (e.g., info, warning, or error).

155 questions
0
votes
3 answers

When to use messages or 404 in django

I have a doubt when using django.contrib.messages or showing a 404 page. In which case do I should use one or the another? serial = get_object_or_404(SerialNumber, serial_number=sn) or try: serial =…
Ruben
  • 1,065
  • 5
  • 18
  • 44
0
votes
4 answers

Django messaging framework messages not making it passed the redirect()

I have some "save" code that sets a success message using the Django messaging framework upon successful creation of a record, then does a redirect back to the main 'application_update' view. I'm having trouble determining why these messages are not…
KeithE
  • 216
  • 2
  • 11
0
votes
1 answer

Django 1.6 messages not showing up

I followed the docs to import necessary stuff into my settings, views and template. However, no messaging is showing up. MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', …
qliq
  • 11,695
  • 15
  • 54
  • 66
0
votes
1 answer

Django messages framework usage

About the messaging framework, in the docs it is written that every message has a message.tag property that can be uses for css. so my code looks like this try: models.save() message.success(request, "Model successfully saved") except…
Apostolos
  • 7,763
  • 17
  • 80
  • 150
0
votes
1 answer

Django 1.4 messages framework

development server use django1.3 but deployment server is powered by django1.4. Messages framework won't work at all on the django1.4 but works great on 1.3 with following code. settings.py MIDDLEWARE_CLASSES = ( …
Goran
  • 6,644
  • 11
  • 34
  • 54
1 2 3
10
11