Skip to content
Myr

Fixed some documentation issues. This fixes #41.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent e52f073 · Browse files · 3 files+9 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+9 added−3 removed

  • other:+9 added−3 removed

3 files+9 added−3 removed

modified:docs/patterns/distribute.rst+2 added-2 removed
23 unmodified lines
24Flask itself, and all the libraries you can find on the cheeseshop25are distributed with either distribute, the older setuptools or distutils.2627In this case we assume your application is called28`yourapplication.py` and you are not using a module, but a `package29<larger-applications>`_. Distributing resources with standard modules is28`yourapplication.py` and you are not using a module, but a :ref:`package29<larger-applications>`. Distributing resources with standard modules is30not supported by `distribute`_ so we will not bother with it. If you have31not yet converted your application into a package, head over to the32:ref:`larger-applications` pattern to see how this can be done.33
127 unmodified lines
modified:docs/patterns/fileuploads.rst+1 added-1 removed
52 unmodified lines
53 def allowed_file(filename):54 return '.' in filename and \55 filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS5657 @app.route('/')57 @app.route('/', methods=['GET', 'POST'])58 def upload_file():59 if request.method == 'POST':60 file = request.files['file']61 if file and allowed_file(file.filename):
99 unmodified lines
modified:docs/api.rst+6 added
208 unmodified lines
209210Useful Functions and Classes211----------------------------212213.. data:: current_app214215 Points to the application handling the request. This is useful for216 extensions that want to support multiple applications running side217 by side.218219.. autofunction:: url_for220221.. function:: abort(code)222
64 unmodified lines