Skip to content

tsytsyksvitlana/weather_reminder

Repository files navigation

Python Django Django Rest Framework Celery SimpleJWT PostgreSQL SQLite Docker pre-commit isort

DjangoWeatherReminder


Generic setup

Create .env file and fill with required data

SECRET_KEY = <YOUR_SECRET_KEY>
EMAIL_HOST_USER = <YOUR_EMAIL_HOST_USER>
EMAIL_HOST_PASSWORD = <YOUR_EMAIL_HOST_PASSWORD>
REDIS_HOST=<YOUR_REDIS_HOST>
WEB_HOST=<YOUR_WEB_HOST>
WEB_PORT=<YOUR_WEB_PORT>
PG_USER=<YOUR_PG_USER>
PG_PASS=<YOUR_PG_PASS>
PG_NAME=<YOUR_PG_NAME>
PG_HOST = <YOUR_PG_HOST>
PG_PORT =<YOUR_PG_PORT>
WEATHER_API_KEY = <YOUR_WEATHERBIT_IO_API_KEY>
TELEGRAM_BOT_TOKEN = <YOUR_TELEGRAM_BOT_TOKEN>
ADMIN_TG_CHAT_ID = <YOUR_ADMIN_TG_CHAT_ID>
TEST_PG_NAME = <YOUR_TEST_PG_NAME>
TEST_PG_USER = <YOUR_TEST_PG_USER>
TEST_PG_PASS = <YOUR_TEST_PG_PASS>

Create home network

docker network create home

Run docker-compose file

docker-compose up

To see your application, visit

http://localhost:8000/

To delete container

docker-compose down -v

Administrator DB migrate

python manage.py makemigrations administrator
python manage.py migrate administrator --database=administrator_db

Production

Finish generic setup

In your .env file add this line

DEBUG = False

Development

To run tests

pytest

Pre-commit command

pre-commit run --all-files

Technology

  • Python 3
  • Django REST Framework
  • Django
  • Celery
  • SimleJWT
  • Docker
  • PostgreSQL
  • SQLite
  • Bootstrap

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages