Use the new FLASK_DEBUG environment variable
which is standard as of Flask 0.11, in order
to control the use of dev or prod config.
Need to set this anyway, in order for "flask run"
to use reloader and no concurrency.
- Update Flask to 0.11 (with built-in Click integration)
- Remove manage.py
- Add autoapp.py per Flask doc's new recommendations
for using Click with an app factory
- Define cookiecutter-flask's commands in cli.py
- Register shell context and shell commands as part
of factory-based app creation
- Update README instructions with examples for running
commands in new Click style
Switch Register CSRF protect from form.hidden_tag to input hidden
value=csrf_token.
I don't understand why this is necessary, as form.hidden_tag works
elsewhere--this may be a symptom of an aliasing issue. However, it was
the solution applied to fix login in a previous commit as described in
https://github.com/sloria/cookiecutter-flask/issues/34.
The `testapp` fixture depends on the `app` fixture, but the `app` fixture's
scope was redefined as 'function' in commit 35c32e, which is narrower than
the scope of `testapp` ('session').
Since `testapp` only depends only on `app`, it is safe to make it's scope match
`app`.
Flask-Migrate was recently patched to version 1.3.1 because [alembic versions can now include parts that are not integers](https://github.com/miguelgrinberg/Flask-Migrate/pull/51).
Requiring Flask-Migrate 1.3.0 installs a version of alembic that results in the following error message on startup:
`ValueError: invalid literal for int() with base 10: 'post2'`
Changing the requirements to install Flask-Migrate 1.3.1 fixes this problem.