diff --git a/docs/patterns/fabric.rst b/docs/patterns/fabric.rst index 49be85ab..dbd4f913 100644 --- a/docs/patterns/fabric.rst +++ b/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 diff --git a/docs/patterns/packages.rst b/docs/patterns/packages.rst index e1b92c08..28cd70e4 100644 --- a/docs/patterns/packages.rst +++ b/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`:: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index b4f6027f..fc5ae0f1 100644 --- a/docs/quickstart.rst +++ b/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 ------- diff --git a/flask/app.py b/flask/app.py index 20fa42d9..1e068e41 100644 --- a/flask/app.py +++ b/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. diff --git a/flask/config.py b/flask/config.py index b588dfa1..bb2d6e9e 100644 --- a/flask/config.py +++ b/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