The first thing to do is to clone the repository:
https://gitlab.com/testtask8/Notification.git
cd Notification
Create a virtual environment to install dependencies in and activate it:
py -m venv notifEnv
notifEnv\Scripts\active
Then install the dependencies:
(notifEnv) pip install -r requirements.txt
Note the (notifEnv)
in front of the prompt.
This indicates that this terminal session operates in a virtual environment set.
Before migrate
command, we need setup .env
file in core
directory.
This directory also contains an example of a completed .env file.
After setup .env
. Go to the root directory and run migration:
cd notifications
python manage.py migrate
Now we can run project:
python manage.py runserver
python -m celery -A core worker -l info -P eventlet
celery -A core beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
Note that eventlet
params specific only for Windows system.
Note that you have to run redis-server
yourself by specifying
port
and host
in the .env
file.
And navigate to http://127.0.0.1:8000/docs/
.
- Organize testing code. (Step 1)
- To open the page with Swagger UI at
/docs/
and display the description of the developed API. (Step 5) - Implement an additional service that once a day sends statistics on processed mailings to email. (Step 8)