flask/examples/flaskr/README

41 lines
939 B
Text
Raw Normal View History

/ Flaskr /
a minimal blog application
2010-04-14 17:09:34 +02:00
~ What is Flaskr?
A sqlite powered thumble blog application
~ How do I use it?
2017-04-02 11:55:05 -04:00
1. edit the configuration in the factory.py file or
export an FLASKR_SETTINGS environment variable
2017-05-25 18:01:52 -04:00
pointing to a configuration file or pass in a
2017-04-02 11:55:05 -04:00
dictionary with config values using the create_app
function.
2. install the app from the root of the project directory
2014-04-29 01:48:31 +02:00
pip install --editable .
2014-04-29 01:48:31 +02:00
3. Instruct flask to use the right application
2017-05-25 18:01:52 -04:00
export FLASK_APP=flaskr.factory:create_app()
4. initialize the database with this command:
2014-04-29 01:48:31 +02:00
2016-05-26 20:45:50 +02:00
flask initdb
5. now you can run flaskr:
2016-05-26 20:45:50 +02:00
flask run
2014-04-29 01:48:31 +02:00
the application will greet you on
http://localhost:5000/
~ Is it tested?
You betcha. Run `python setup.py test` to see
the tests pass.