----Chuong trinh quan ly dao tao----
Link git: https://github.com/LongPhanPip/qldt
Clone from git:
git clone https://github.com/LongPhanPip/qldt qldt
Push to git:
git remote add origin https://github.com/LongPhanPip/qldt
git push -u origin master
Prequisite:
Python: 3.8
Mysql: 8.0
Docker
Run:
Init:
docker-compose up -d
Debug log:
docker-compose logs
Execute command:
docker-compose exec backend [command]
ReBuild:
docker-compose --build
#warning: Don't update or delete data directly to database
Access database:
docker-compose exec db mysql -u root -p qldt_db
Enter password: 123456
Setup without docker
- Install pipenv
- pipenv install
- Delete all the migrations folders
- Delete .db folder
- Open mysql with username and password
- Go to settings.py in config folder, find DATABASES dict, type your username and password, port(default is 3306), host(use localhost), name(database name)
- Go to mysql(mysql -u -p) create database with the name above(CREATE DATABASE <DATABASE_NAME>)
- pipenv shell
- python manage.py makemigrations accounts persons students teachers school
- python manage.py migrate
- python manage.py createsuperuser
- python manage.py runserver