Answers for "name 'messages' is not defined django"

1

from django.contrib import messages

{% if messages %}
    {% for message in messages %}
    <p id="messages">{{message}}</p>
    {% endfor %}
{% endif %}
Posted by: Guest on May-28-2020
0

django messages

from django.contrib import messages
messages.add_message(request, messages.INFO, 'Hello world.')
Posted by: Guest on April-20-2020

Code answers related to "name 'messages' is not defined django"

Python Answers by Framework

Browse Popular Code Answers by Language