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

Run server in development mode:

python manage.py runserver

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/various-useful-apis.service
sudo nano /etc/systemd/system/various-useful-apis.socket

systemctl daemon-reload

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

sudo systemctl start various-useful-apis.socket
sudo systemctl enable various-useful-apis.socket

sudo service various-useful-apis start

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

About

Various useful APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages