Django Notifications App Django.How

Author avatar wrote on 26/05/2022

Install Django Notifications App

We will use this app – Connect to preview
They have good documentation about how to install and use this app, just read README file.

1.Run command in our terminal:

pip install django-notifications-hq

2.Add to main


Important that ‘notifications’ must be after ‘django.contrib.auth’. Also add this string:


3.To our main add this code:

from django.conf.urls import url
import notifications.urls

urlpatterns = [
    url('^inbox/notifications/', include(notifications.urls, namespace='notifications')),
] + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)

4.Run migtation command in our terminal:

python migrate notifications

Now u can use Notifications App.

Customizations for our project

Note: If you want to test with these CSS classes, you can get the open-source CSS file at

1.Add to _header.html file following code inside nav menu

2.Add to the end of _footer.html file this code

3.Add js files in base.html file after _footer.html including

4.Save the following file to our projects js folder and run “python collectstatic“ command in our terminal

Fire a notification

You can add a notification in in any method

#Make notification to admin 
recipient = User.objects.get(id=1) 
notify.send(recipient, recipient=recipient, verb='New Contact us request')

This example from contact us page

We stand with Ukraine