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....
Cookiecutter Django With Amazon RDS
So, we need to connect our docker based django app to our RDS instance, here are the steps to do so. Step 1 Remove DATABASE_URL=postgres://postgres from .envs/.production/.django Step 2 Update .envs/.production/.postgres and setup your database credentials. POSTGRES_HOST= # db host POSTGRES_PORT= # db port POSTGRES_DB= # db name POSTGRES_USER= # db user POSTGRES_PASSWORD= # db pass Step 3 Comment or remove Postgres volumes and services from production.yml file. You will have to remove the complete postgres service....