Follow the recipe
-
Settings and database
- build psycity/psycity/local_settings.py \
- put the code bellow in that file
from .settings import * DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME' : 'db.sqlite3' } }
-
Set the environment variables:
in linux you can set env like below
export DJANGO_SETTINGS_MODULE=psycity.local_settings
-
Install requirements:
install the god damn requirements no matter how
you can use venv or no just install them simply.$ python -m venv venv $ source venv/bin/activate #in linux $ pip install -r requirements.txt
-
Migrations:
python manage.py makemigrations
python manage.py migrate
-
Runserver:
python manage.py runserver
then check out schema in 127.0.0.1:8000/swagger/
or 127.0.0.1:8000/redoc/