A small (emulated) utility for scheduling and tracking notifications using Django.
-
Install
pip
,virtualenv
,rabbitmq-server
-
Setup database:
-
Login to the root user using mysql shell.
-
Create database as follows:
CREATE DATABASE notification_creator;
-
Create a new user:
CREATE USER 'ns-admin'@'localhost' IDENTIFIED BY '%password%';
-
Grant permissions to user:
GRANT ALL PRIVILEGES ON notification_creator.* TO 'ns-admin'@'localhost';
-
Select the database using:
USE notification_creator;
-
-
Create a file named
dev.py
orproduction.py
in thenotification_sender/settings
directory and copy variables frombase.py
which need to be modified. -
Add the following line to your
.bashrc
or.zshrc
or equivalent shell configuration file:export DJANGO_SETTINGS_MODULE="notification_creator.settings.dev"
-
Load the new settings in your shell using
source ~/.zshrc
orsource ~/.bashrc
. -
Install dependencies:
pip install -r requirements.txt
-
Migrate the database:
python manage.py migrate
-
Run the test cases:
python manage.py test
-
Run the Celery worker:
celery -A notification_creator worker -l info
-
Check the setup using the following command:
python manage.py runserver
-
For UI, AdminLTE is used which depends on Bootstrap.
-
Enabling timezone support for Django is done via django-tz-detect
-
Date time picker for the create form is picked from Bootstrap Date Time Picker