Skip to content

andchir/various-useful-api-django

Repository files navigation

Various useful APIs

Various useful APIs for api2app.ru.

screenshot #1 screenshot #2

Create superuser:

python manage.py createsuperuser

Migrations:

python manage.py makemigrations
python manage.py migrate

Copy all files from static folders into the STATIC_ROOT directory:

python manage.py collectstatic

Generate API schema:

python manage.py spectacular --color --file schema.yml

API schema URLs:

/api/schema/swagger-ui/
/api/schema/redoc/

Deploy:

sudo nano /etc/systemd/system/price-monitoring.service
sudo nano /etc/systemd/system/price-monitoring.socket

Enable and start the socket (it will autostart at boot too):

sudo systemctl start price-monitoring.socket
sudo systemctl enable price-monitoring.socket

Commands:

./manage.py site_monitoring --uuid=4217211a-80e5-11ef-b5ed-9fe997cb3299
./manage.py site_monitoring_log --uuid=4217211a-80e5-11ef-b5ed-9fe997cb3299

*/3 * * * * /home/andrew/python_projects/site_monitoring/venv/bin/python /home/andrew/python_projects/site_monitoring/manage.py site_monitoring > /dev/null

Releases

No releases published

Packages

No packages published

Languages