Sending Notifications to Django Users

So, you want to notify the user via email or push notification or sms or whatsapp or whatever, after they did something on your website/app. Installation Install mad_notifications from using pip install mad_notifications INSTALLED_APPS = [ ... 'mad_notifications', ] update your project’s urls.py and add path('notifications/', include('mad_notifications.api.urls')), Its installed now, what next? Basic Usage Call it where you want it. from mad_notifications.shorthand import newNotification return newNotification( user = get_user_model(id=SOME_ID), # django user object title = "Welcome to my website/app", # string content = "Thanks for join my website/app", # string ) this will send an email to the user, where the title will be the subject and content will be the content....

August 30, 2022 · 1 min · Haseeb Ur Rehman