Browse Source

Fixed some documentation issues. This fixes #41.

pull/1638/head
Armin Ronacher 15 years ago
parent
commit
854e0e26d1
  1. 6
      docs/api.rst
  2. 4
      docs/patterns/distribute.rst
  3. 2
      docs/patterns/fileuploads.rst

6
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)

4
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
<larger-applications>`_. Distributing resources with standard modules is
`yourapplication.py` and you are not using a module, but a :ref:`package
<larger-applications>`. 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.

2
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']

Loading…
Cancel
Save