diff --git a/docs/patterns/index.rst b/docs/patterns/index.rst index 513647c9..9678e3be 100644 --- a/docs/patterns/index.rst +++ b/docs/patterns/index.rst @@ -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 end of the request, the database connection is closed again. +There are more user contributed snippets and patterns in the `Flask +Snippet Archives `_. + .. toctree:: :maxdepth: 2 diff --git a/flask.py b/flask.py index 6614cba0..7cff64d2 100644 --- a/flask.py +++ b/flask.py @@ -931,10 +931,7 @@ class Flask(_PackageBoundObject): :param rv: the return value from the view function """ if rv is None: - from warnings import warn - warn(Warning('View function did not return a response'), - stacklevel=2) - return u'' + raise ValueError('View function did not return a response') if isinstance(rv, self.response_class): return rv if isinstance(rv, basestring):