views:
from django.contrib import messages
if user is not None:
login(request, user)
messages.success(request, 'Вход выполнен')
else:
messages.error(request, "Неправильный логин")
Templates/AppName/Messages.html:
{% for message in messages %}
<div class="alert {{ message.tags }} alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
{{ message }} {{ user.first_name}} {{ user.last_name}}
</div>
{% endfor %}
Нужный_шаблон.html:
<div class="col-md-4">
{% include 'AppName/messages.html' %}
</div>