Updated documentation once more for new cli.
This commit is contained in:
parent
a3a5075a94
commit
a3ad5405a6
4 changed files with 41 additions and 6 deletions
|
|
@ -90,11 +90,16 @@ Using Applications
|
|||
------------------
|
||||
|
||||
So to use such an application you then have to create the application
|
||||
first. Here an example `run.py` file that runs such an application::
|
||||
first in a separate file otherwise the ``flask`` command won't be able
|
||||
to find it. Here an example `exampleapp.py` file that creates such
|
||||
an application::
|
||||
|
||||
from yourapplication import create_app
|
||||
app = create_app('/path/to/config.cfg')
|
||||
app.run()
|
||||
|
||||
It can then be used with the ``flask`` command::
|
||||
|
||||
flask --app=exampleapp run
|
||||
|
||||
Factory Improvements
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@ So here is a full example::
|
|||
return redirect(url_for('index'))
|
||||
return render_template('login.html', error=error)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
|
||||
|
||||
And here the ``layout.html`` template which does the magic:
|
||||
|
||||
.. sourcecode:: html+jinja
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue