[TOC]
-
python manage.py --help
下有很多有用的命令# 创建数据库 # create database if not exists keplerblog; cd source/ # 部署 python manage.py deploy # 添加管理员 python manage.py create_user # 生成测试数据 python manage.py fake # 也可以单独构造用户、文章、评论测试数据 # python manage.py userfake # python manage.py commonfake # python manage.py categoryfake # 创建账号 python manage.py create_user # 查询全部用户 python manage.py query_all
# Python 3.9.5
python -m venv venvdir
source venvdir/bin/activate
pip install -r source/requirements/dev.txt
-
Character set 'utf8' unsupported in python mysql connector
pip3 install mysql-connector-python==8.0.29
-
Exception: Install 'email_validator' for email validation support.
-
ImportError: cannot import name 'MigrateCommand' from 'flask_migrate'
cd source/
# python manage.py dev
python wsgi.py