xxxxxxxxxx
# views.py
from django.contrib import messages
messages.error(request,"Wrong Username and Password",extra_tags='danger')
# index.html
{% for message in messages %}
<div class="alert alert-{{ message.extra_tags }}">
{{message}}
</div>
{% endfor %}
mefiz.com