From fd9bf8f37609f220f4829050eed94df208543c56 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sat, 27 Jul 2013 01:20:42 +0200 Subject: [PATCH 1/2] Fix #782 -- /tmp/ in tutorial --- docs/tutorial/setup.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/tutorial/setup.rst b/docs/tutorial/setup.rst index 3a8fba33..becb941c 100644 --- a/docs/tutorial/setup.rst +++ b/docs/tutorial/setup.rst @@ -25,6 +25,12 @@ In `flaskr.py`:: USERNAME = 'admin' PASSWORD = 'default' +.. admonition:: Windows + + If you are on Windows, replace `/tmp/flaskr.db` with a different writeable + path of your choice, in the configuration and for the rest of this + tutorial. + Next we can create our actual application and initialize it with the config from the same file, in `flaskr.py`:: From b6116c1de3f3556f6ae18d87348355d2545ce314 Mon Sep 17 00:00:00 2001 From: Robert Picard Date: Mon, 29 Jul 2013 13:42:04 -0400 Subject: [PATCH 2/2] Remove Werkzeug bug workaround from flask/app.py According to the note in the comment, you had to check to make sure that the defaults were not an empty dictionary because of a bug in Werkzeug pre-0.7. Since Flask officially requires 0.7 or greater, we can remove this little workaround. --- flask/app.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/flask/app.py b/flask/app.py index addc40b4..a08e76d8 100644 --- a/flask/app.py +++ b/flask/app.py @@ -968,11 +968,6 @@ class Flask(_PackageBoundObject): # Add the required methods now. methods |= required_methods - # due to a werkzeug bug we need to make sure that the defaults are - # None if they are an empty dictionary. This should not be necessary - # with Werkzeug 0.7 - options['defaults'] = options.get('defaults') or None - rule = self.url_rule_class(rule, methods=methods, **options) rule.provide_automatic_options = provide_automatic_options