The project belongs to BUAA SCSE 2019 Spring SE course. This repo is the backend part.
Visit our blog for more infomation.
The backend is driven by python3, Django 3.0 and Postgresql.
Therefore, it's necessary to set up a Postgresql database before running the backend. Docker is recommended.
Required python packages are listed in requirements.txt. You can install the packages with
# pip
pip install -r requirements.txt
# conda
conda install --file requirements.txt
With the consideration of security, we use the environment variable as our config. For example, database info.
You can check here to find out the required variables.
Convert the models into database tables. The script is as below
# generate migrations files before migrate to database
python manage.py makemigrations
# migrate to database
python manage.py migrate
Run server and listening to 8000 port as default.
python manage.py runserver