Browse Source

Merge branch 'master' into refactor-init

pull/2849/head
Gabriel Saldanha 7 years ago committed by GitHub
parent
commit
a0275e7878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/api.rst
  2. 2
      docs/patterns/fileuploads.rst
  3. 8
      flask/__init__.py

2
docs/api.rst

@ -115,7 +115,7 @@ To access the current session you can use the :class:`session` object:
.. class:: session
The session object works pretty much like an ordinary dict, with the
difference that it keeps track on modifications.
difference that it keeps track of modifications.
This is a proxy. See :ref:`notes-on-proxies` for more information.

2
docs/patterns/fileuploads.rst

@ -25,7 +25,7 @@ bootstrapping code for our application::
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = '/path/to/the/uploads'
ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER

8
flask/__init__.py

@ -34,9 +34,5 @@ from .signals import (signals_available, template_rendered, request_started,
appcontext_tearing_down, appcontext_pushed,
appcontext_popped, message_flashed, before_render_template)
# Expose a convenient wrapper around python's builtin json module.
from .json import jsonify
# backwards compat, goes away in 1.0
from .sessions import SecureCookieSession as Session
json_available = True
# Expose a convenient wrapper around json module.
from .json import jsonify
Loading…
Cancel
Save