forked from orbit-oss/flask
Merge branch 'master' into module-support
This commit is contained in:
commit
ce53d10236
2 changed files with 4 additions and 4 deletions
|
|
@ -10,6 +10,9 @@ changes are they will open a database connection at the beginning of the
|
||||||
request and get the information of the currently logged in user. At the
|
request and get the information of the currently logged in user. At the
|
||||||
end of the request, the database connection is closed again.
|
end of the request, the database connection is closed again.
|
||||||
|
|
||||||
|
There are more user contributed snippets and patterns in the `Flask
|
||||||
|
Snippet Archives <http://flask.pocoo.org/snippets/>`_.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
|
|
||||||
5
flask.py
5
flask.py
|
|
@ -931,10 +931,7 @@ class Flask(_PackageBoundObject):
|
||||||
:param rv: the return value from the view function
|
:param rv: the return value from the view function
|
||||||
"""
|
"""
|
||||||
if rv is None:
|
if rv is None:
|
||||||
from warnings import warn
|
raise ValueError('View function did not return a response')
|
||||||
warn(Warning('View function did not return a response'),
|
|
||||||
stacklevel=2)
|
|
||||||
return u''
|
|
||||||
if isinstance(rv, self.response_class):
|
if isinstance(rv, self.response_class):
|
||||||
return rv
|
return rv
|
||||||
if isinstance(rv, basestring):
|
if isinstance(rv, basestring):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue