diff --git a/docs/api.rst b/docs/api.rst index e13e9524..2225ee07 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -210,6 +210,12 @@ thing, like it does for :class:`request` and :class:`session`. Useful Functions and Classes ---------------------------- +.. data:: current_app + + Points to the application handling the request. This is useful for + extensions that want to support multiple applications running side + by side. + .. autofunction:: url_for .. function:: abort(code) diff --git a/docs/patterns/distribute.rst b/docs/patterns/distribute.rst index 89a7e864..2826550c 100644 --- a/docs/patterns/distribute.rst +++ b/docs/patterns/distribute.rst @@ -25,8 +25,8 @@ Flask itself, and all the libraries you can find on the cheeseshop are distributed with either distribute, the older setuptools or distutils. In this case we assume your application is called -`yourapplication.py` and you are not using a module, but a `package -`_. Distributing resources with standard modules is +`yourapplication.py` and you are not using a module, but a :ref:`package +`. Distributing resources with standard modules is not supported by `distribute`_ so we will not bother with it. If you have not yet converted your application into a package, head over to the :ref:`larger-applications` pattern to see how this can be done. diff --git a/docs/patterns/fileuploads.rst b/docs/patterns/fileuploads.rst index 6d0bd0a1..1174ebfc 100644 --- a/docs/patterns/fileuploads.rst +++ b/docs/patterns/fileuploads.rst @@ -54,7 +54,7 @@ the file and redirects the user to the URL for the uploaded file:: return '.' in filename and \ filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS - @app.route('/') + @app.route('/', methods=['GET', 'POST']) def upload_file(): if request.method == 'POST': file = request.files['file']