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
0 answers

Messages not appearing on HTML using Django - messages

I know a lot of questions were around that topic, but I still cannot understand why in my case it's not working. I have the function on my views.py @csrf_exempt def index(request): if request.method == 'POST': form =…
0
votes
0 answers

django messages not displaying

If i post the message to the webapp, i can find it if i log in as a django super user and check in the backend using the django admin pannel but they are not displaying on my website.. I'll put up screengrabs of all the related code. these are my…
0
votes
0 answers

Django messages only work if DEBUG = True

I'm using Django with Wagtail CMS. I'm trying to give the user a message on registering an account and when you cancel the account. At this moment this both work, but only when when I have the settings DEBUG = True, if I set DEBUG to false (as it…
Fefe
  • 13
  • 3
0
votes
2 answers

wagtail on-publish custom sucess message

I have a question regarding the success message wagtail is displaying when an editor is publishing a page in the admin interface. It's usually "Page {Page.title} has been published". 
I’am trying to figure out how to add one’s own success or error…
JeanDLH
  • 3
  • 2
0
votes
1 answer

Django Messages - Debug Tag Messages Not Showing On Template

I am going through the docs for Django Messages and have set up a basic form with some error messages and a debug message. The error messages are appearing but the debug one is not. I am not sure why the debug one is not and would appreciate some…
Jake Mulhern
  • 660
  • 5
  • 13
0
votes
0 answers

Django In-built Messages

I'm working on one of my Django Project(currently it's only able to Registered user and get them logged in). but the problem that I have facing is that when users provide incorrect data while registering(like password1 does not match with password2…
0
votes
0 answers

How to remove the default "Successfully deleted ..." message for "Delete Selected" in Django Admin Action?

In the overridden delete_queryset(), I deleted loaded messages and added the new message "Deleted successfully!!" as shown below: # "store/admin.py" from .models import Person from django.contrib import admin,…
0
votes
0 answers

adding a message for the user in a custom django admin view

I have created a custom admin site and there is a view I'd like to be invoked with a custom button. This is my adminSite object: class MyAdminSite(admin.AdminSite): site_header = 'My admin site' def get_urls(self): from django.urls…
0
votes
1 answer

Email error: Message is not sending to the email instead it is printing in the terminal

When I am registering as a new user or want to change my password, then the Message which is needed to be sent to the email is showing in the terminal instead. Here is the terminal picture: enter image description here Here is the views.py…
0
votes
1 answer

Creating a simple messaging function (NOT REAL TIME) using Django

Please I'm trying to implement a SIMPLE messaging function (NOT A REAL TIME CHAT) But I keep getting this error message I understand what it says or mean but I'm not sure why I am unable to establish this relationship Please I need help to…
osahenru
  • 31
  • 3
0
votes
1 answer

TypeError at /email/ getaddrinfo() argument 1 must be string or None

i was trying to send message to candidate using Gmail as smtp, when i click send button im seeing the above…
0
votes
1 answer

BUG: When passing django.messages variable through HTML tag

messages.info(request, 'Attendance Ready To Be Taken!') Over here i use django messages to send a string to the user {% for message in messages %} {% if message == 'Attendance Ready To Be Taken!' %}   …
Louis
  • 49
  • 1
  • 1
  • 6
0
votes
2 answers

Django login messages not being delivered as expected

I'm building a Django project and I have a Django app for the login, which I called members. The project is behind the login, so all the URLs redirect to the login page if the user is not logged. If the user inputs an existing user and password, the…
0
votes
1 answer

module 'django.contrib.messages.constants' has no attribute 'error'

I was working on my django project and everything seemed fine, until I simply wanted to login, and I found this error: module 'django.contrib.messages.constants' has no attribute 'error' The code that is responsible for this has not been touched…
Kaiss B.
  • 249
  • 1
  • 12
0
votes
0 answers

Django message + nginx: message showing after 3 times reload !! admin login redirects back to admin login page after giving right credentials

I have built a Django application. It was working fine in the development mode. But I tried to host it in the digital ocean, Every thing worked fine, but when any error message is sent as a response, It doesn't show instantly in the front-end.…