templates used to fast create flask project.
pip install flask_template
flasktemplate create [-t simple] project_name
will create a flask project directory named after project_name on current path.
flasktemplate create -t mongo project_name
will create a flask project directory named after project_name on current path. mongo template will use mongodb instead of mysql.
flasktemplate list
will list current supported templates.
normal project initial usage flow:
cd {project_name}
pyenv virtualenv {python_version} {virtualenv_name}
pyenv activate {virtualenv_name}
- modify
SQLALCHEMY_DATABASE_URI
with correct database account and database name - design and develop models and migrate, apply them into database with:
python manage.py db migrate
python manage.py db upgrade
- design develop apis
- add mongo template
- use mongodb instead of mysql as database
- add hamlet user authentication, send email
- add celery wokers
- add send email, tar/zip file, send file
- add dockerfile
- update requirements
- fix bugs
-
modify config.py;
-
format by pycodestyle;
-
add migrations directory,modify env.py script to support alembic:include, alembic:exclude options in alembic.ini to limit alembic dectecting tables;
-
fix some typo;