Skip to content

This is the term project for the course Database Systems Laboratory.

License

Notifications You must be signed in to change notification settings

mizunashi-sh/TrafficMan-DB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrafficMan-DB

This is the term project for the course Database Systems Laboratory.

Configure Virtual Environment

Execute the following commands

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Prepare the SECRET KEY

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"

Prepare Database

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 superuser

Create a superuser to use tha admin page

python manage.py createsuperuser

Run server in debug environment

Run the following command

python manage.py runserver

Deploy

Please read the document for more information.

About

This is the term project for the course Database Systems Laboratory.

Resources

License

Stars

Watchers

Forks

Packages

No packages published