This is the term project for the course Database Systems Laboratory.
Execute the following commands
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Execute the following commands to generate secret key:
python manage.py shell
>>>from django.core.management.utils import get_random_secret_key
>>>get_random_secret_key()
'i!$!1s%4kzi%q(_^9b$i&!&apwu1!)l#=x99l2(6m=7+i(ajtm'
Then add the SECRET KEY to the environment variable:
export SECRET_KEY="xxxxxxxx"
Create a database on your MySQL server, and configure DATABASES
at dbproject/settings.py. Please read the document to
learn more.
Run the following commands
python manage.py makemigrations TrafficMan
python manage.py migrate
Then run the file sql/db.sql on the database you created. You might need to change the database name user002db in this file to the name of the databased you created.
Create a superuser to use tha admin page
python manage.py createsuperuser
Run the following command
python manage.py runserver
Please read the document for more information.