quick start

  • python3.8+

  • 安装虚拟环境(optional)

pip install virtualenv
virtualenv .venv
.venv/Scripts/activate
  • 安装库
pip install -r requirements.txt
  • 生成数据库和静态文件
python .\manage.py makemigrations  
python .\manage.py migrate
python .\manage.py collectstatic
  • 自动添加数据
    powershell
    在项目根目录下
$env:PYTHONPATH=pwd
python .\tools\generator.py
  • 生成超级用户(optional)
python .\manage.py createsuperuser
  • 启动
python .\manage.py runserver
// or
uvicorn library_portal.asgi:application