Adevanced django project creating on HTML, CSS, JavaScript, Django, Django DRF.
Gunicorn, Nginx, Celery, Redis, Docker, PostgreSQL, sqlite3, Dj-Database-url, GraphQL, ElasticSearch, Markdown2.
#!/bin/bash
#### YOUR SECRET KEY ####
SECRET_KEY = "SECRET_KEY" # your django secret key
#### SETTINGS MODE ####
MODE = "development" # 'development' or 'production'
#### EMAIL HOST ####
EMAIL_HOST_USER = "EMAIL_HOST_USER" # your email address
EMAIL_HOST_PASSWORD = "EMAIL_HOST_PASSWORD" # your email address password
#### DATABASE POSTGRESQL ####
NAME = "NAME" # database name
USER = "USER" # database user
PASSWORD = "PASSWORD" # database password
HOST = "localhost" # default
PORT = "5432" # default
Windows:
python -m venv env
env\Scripts\activate
pip install -r requirements.txt
Linux:
python -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
Run:
python manage.py collectstatic
python manage.py makemigrations
python manage.py migrate
python manage.py createadmin # create superuser
python manage.py runserver
Runing on host 127.0.0.1:8000
Linux or Ubuntu on windows:
sudo systemctl start redis-server
sudo systemctl enable redis-server
sudo systemctl status redis-server
Celery worker:
celery -A core worker --loglevel=info
Celery Beat:
celery -A core beat --loglevel=info
Celery Flower:
celery -A core flower
Web-interfays flower on brauzer http://localhost:5555.