Browse Source

Merge branch 'master' of github.com:mitsuhiko/flask

pull/232/merge
Armin Ronacher 14 years ago
parent
commit
9c00f8b787
  1. 10
      docs/patterns/fabric.rst
  2. 2
      docs/patterns/packages.rst
  3. 5
      docs/quickstart.rst
  4. 9
      flask/app.py
  5. 4
      flask/config.py

10
docs/patterns/fabric.rst

@ -32,7 +32,7 @@ hosts. These hosts can be defined either in the fabfile or on the command
line. In this case we will add them to the fabfile.
This is a basic first example that has the ability to upload the current
sourcecode to the server and install it into a already existing
sourcecode to the server and install it into a pre-existing
virtual environment::
from fabric.api import *
@ -53,12 +53,12 @@ virtual environment::
put('dist/%s.tar.gz' % dist, '/tmp/yourapplication.tar.gz')
# create a place where we can unzip the tarball, then enter
# that directory and unzip it
run('mkdir yourapplication')
run('mkdir /tmp/yourapplication')
with cd('/tmp/yourapplication'):
run('tar xzf /tmp/yourapplication.tar.gz')
# now setup the package with our virtual environment's
# python interpreter
run('/var/www/yourapplication/env/bin/python setup.py install')
# now setup the package with our virtual environment's
# python interpreter
run('/var/www/yourapplication/env/bin/python setup.py install')
# now that all is set up, delete the folder again
run('rm -rf /tmp/yourapplication /tmp/yourapplication.tar.gz')
# and finally touch the .wsgi file so that mod_wsgi triggers

2
docs/patterns/packages.rst

@ -57,7 +57,7 @@ following quick checklist:
2. all the view functions (the ones with a :meth:`~flask.Flask.route`
decorator on top) have to be imported when in the `__init__.py` file.
Not the object itself, but the module it is in. Import the view module
*after the application object is created*.
**after the application object is created**.
Here's an example `__init__.py`::

5
docs/quickstart.rst

@ -113,6 +113,11 @@ Screenshot of the debugger in action:
:class: screenshot
:alt: screenshot of debugger in action
.. admonition:: Working With Other Debuggers
Debuggers interfere with each other. If you are using another debugger
(e.g. PyDev or IntelliJ), you may need to set ``app.debug = False``.
Routing
-------

9
flask/app.py

@ -928,15 +928,6 @@ class Flask(_PackageBoundObject):
finally:
ctx.pop()
The big advantage of this approach is that you can use it without
the try/finally statement in a shell for interactive testing:
>>> ctx = app.test_request_context()
>>> ctx.bind()
>>> request.path
u'/'
>>> ctx.unbind()
.. versionchanged:: 0.3
Added support for non-with statement usage and `with` statement
is now passed the ctx object.

4
flask/config.py

@ -141,8 +141,8 @@ class Config(dict):
Objects are usually either modules or classes.
Just the uppercase variables in that object are stored in the config
after lowercasing. Example usage::
Just the uppercase variables in that object are stored in the config.
Example usage::
app.config.from_object('yourapplication.default_config')
from yourapplication import default_config

Loading…
Cancel
Save