$ pip install -e .
$ FLASK_APP=yap FLASK_ENV=development flask db upgrade
$ FLASK_APP=yap FLASK_ENV=development flask run
$ pip install -e .[test]
$ pytest
You can find an example configuration in config.py.example. YAP looks for the configuration file in the instance directory. Its location depends on the installation type -- consult flask docs for details.
You have to set at least SECRET_KEY
for the application to work with some default settings (that
include sqlite as database backend).
$ FLASK_APP=yap flask db upgrade
- Make some changes to the models.
- Call
FLASK_APP=yap flask db revision 'change description'
. - Make sure that the generated migration works. If not, then adjust it manually. In case of adding new fields that are not nullable consider splitting the upgrade step to 3 smaller ones: add nullable field, set proper values for all existing records, make it nullable.
- Commit migration to the repo.