Django DRF
- Create Enviroment.
python3 -m venv env
source env/bin/activate
- Pip install python enterpretator requirements.txt
pip3 install -r requirements.txt
- Create
.env
file in workdir and add code for example on.env-example
.
#!/bin/bash/
#### SECRET KEYS ####
SECRET_KEY="..." # your django secret key
#### DEBUG ####
DEBUG="True" # default True
#### Database ####
NAME="..." # database name
USER="..." # database user
PASSWORD="..." # database password
HOST="localhost" # database host default localhost
PORT=5432 # database port default 5432
#### TEST AUTHENTICATIE JWT TOKEN #####
AUTHENTICATION_TOKEN="..." # JWT token
- Create all tables in database.
python3 manage.py makemigrations
python3 manage.py migrate
- Create super user.
python3 createuser.py
- Run
python3 manage.py runserver