commit
d5308bb80c
3 changed files with 5 additions and 7 deletions
|
|
@ -69,7 +69,7 @@ find a piece of code that looks very much like this::
|
||||||
with self.request_context(environ):
|
with self.request_context(environ):
|
||||||
try:
|
try:
|
||||||
response = self.full_dispatch_request()
|
response = self.full_dispatch_request()
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
response = self.make_response(self.handle_exception(e))
|
response = self.make_response(self.handle_exception(e))
|
||||||
return response(environ, start_response)
|
return response(environ, start_response)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -421,9 +421,8 @@ class Flask(_PackageBoundObject):
|
||||||
#: A dictionary with lists of functions that should be called after
|
#: A dictionary with lists of functions that should be called after
|
||||||
#: each request. The key of the dictionary is the name of the blueprint
|
#: each request. The key of the dictionary is the name of the blueprint
|
||||||
#: this function is active for, ``None`` for all requests. This can for
|
#: this function is active for, ``None`` for all requests. This can for
|
||||||
#: example be used to open database connections or getting hold of the
|
#: example be used to close database connections. To register a function
|
||||||
#: currently logged in user. To register a function here, use the
|
#: here, use the :meth:`after_request` decorator.
|
||||||
#: :meth:`after_request` decorator.
|
|
||||||
self.after_request_funcs = {}
|
self.after_request_funcs = {}
|
||||||
|
|
||||||
#: A dictionary with lists of functions that are called after
|
#: A dictionary with lists of functions that are called after
|
||||||
|
|
@ -791,8 +790,7 @@ class Flask(_PackageBoundObject):
|
||||||
|
|
||||||
It is not recommended to use this function for development with
|
It is not recommended to use this function for development with
|
||||||
automatic reloading as this is badly supported. Instead you should
|
automatic reloading as this is badly supported. Instead you should
|
||||||
be using the :command:`flask` command line script's ``runserver``
|
be using the :command:`flask` command line script's ``run`` support.
|
||||||
support.
|
|
||||||
|
|
||||||
.. admonition:: Keep in Mind
|
.. admonition:: Keep in Mind
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ class Config(dict):
|
||||||
app.config['IMAGE_STORE_BASE_URL'] = 'http://img.website.com'
|
app.config['IMAGE_STORE_BASE_URL'] = 'http://img.website.com'
|
||||||
image_store_config = app.config.get_namespace('IMAGE_STORE_')
|
image_store_config = app.config.get_namespace('IMAGE_STORE_')
|
||||||
|
|
||||||
The resulting dictionary `image_store` would look like::
|
The resulting dictionary `image_store_config` would look like::
|
||||||
|
|
||||||
{
|
{
|
||||||
'type': 'fs',
|
'type': 'fs',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue