From d0eefb01d16bd058172363a9847b5d98ccd1abc9 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 3 May 2010 12:22:27 +0200 Subject: [PATCH 1/2] Added link to snippets website to the patterns docs. --- docs/patterns/index.rst | 3 +++ 1 file changed, 3 insertions(+) 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 From 9248a7baca5bc616a60f9b63b525e872fbfddef2 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 3 May 2010 13:07:30 +0200 Subject: [PATCH 2/2] None responses fail properly now. This fixes #24 --- flask.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/flask.py b/flask.py index a50b95be..c1229d6e 100644 --- a/flask.py +++ b/flask.py @@ -752,10 +752,7 @@ class Flask(object): :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):