forked from orbit-oss/flask
Fixed some documentation issues. This fixes #41.
This commit is contained in:
parent
e52f073e3e
commit
854e0e26d1
3 changed files with 9 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue