How to activate notification Bootstrap 4?

At bootstrap there is a notification.

How to activate the notification? The documentation only says how to close it.

Scenario: User entered the data, clicked on the button. Data were checked and if they are invalid is called a notification.
April 19th 20 at 12:18
2 answers
April 19th 20 at 12:20

from django.contrib import messages
 if user is not None:
 login(request, user)
 messages.success(request, 'logged in')
 messages.error(request, "Incorrect login")

{% 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">&times;</span>
 {{ message }} {{ user.first_name}} {{ user.last_name}}
{% endfor %}

<div class="col-md-4">
 {% include 'AppName/messages.html' %}
April 19th 20 at 12:22
The alert initially to register the class d-noneto alert was not displayed, and then when you want to display an alert with this class to remove:

Find more questions by tags Bootstrap