From 56f5224ef7cdc48a05b4ce6dcc37043feab0c0bb Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Sun, 1 Jul 2012 19:31:53 +0300 Subject: [PATCH 01/10] CHANGES: July 1th should be July 1st --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6d0c4925..5889aa92 100644 --- a/CHANGES +++ b/CHANGES @@ -77,7 +77,7 @@ Released on July 1st 2012, codename Camapri. Version 0.8.1 ------------- -Bugfix release, released on July 1th 2012 +Bugfix release, released on July 1st 2012 - Fixed an issue with the undocumented `flask.session` module to not work properly on Python 2.5. It should not be used but did cause From d8e5a37d8a5e9dda1154c6c7c614bb7a4c42afdd Mon Sep 17 00:00:00 2001 From: esaurito Date: Mon, 2 Jul 2012 00:38:27 +0300 Subject: [PATCH 02/10] Fixed codename --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5889aa92..7d1aeca1 100644 --- a/CHANGES +++ b/CHANGES @@ -6,7 +6,7 @@ Here you can see the full list of changes between each Flask release. Version 0.9 ----------- -Released on July 1st 2012, codename Camapri. +Released on July 1st 2012, codename Campari. - The :func:`flask.Request.on_json_loading_failed` now returns a JSON formatted response by default. From 0553bbdefe55709a1fc36dce445f552f398a428e Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Wed, 4 Jul 2012 21:12:41 +0200 Subject: [PATCH 03/10] Made it explicitly clear where changes should go in the tutorial --- docs/tutorial/dbinit.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/dbinit.rst b/docs/tutorial/dbinit.rst index b546a1a8..15a107cf 100644 --- a/docs/tutorial/dbinit.rst +++ b/docs/tutorial/dbinit.rst @@ -23,14 +23,17 @@ for you to the application. If you want to do that, you first have to import the :func:`contextlib.closing` function from the contextlib package. If you want to use Python 2.5 it's also necessary to enable the `with` statement -first (`__future__` imports must be the very first import):: +first (`__future__` imports must be the very first import). Accordingly, +the following lines should be to your existing import lines in +`flaskr.py`:: from __future__ import with_statement from contextlib import closing Next we can create a function called `init_db` that initializes the database. For this we can use the `connect_db` function we defined -earlier. Just add that function below the `connect_db` function:: +earlier. Just add that function below the `connect_db` function in +`flask.py`:: def init_db(): with closing(connect_db()) as db: From 690b0c34ff3a9160aad16c613f29b1a8e25ca232 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Wed, 4 Jul 2012 21:19:41 +0200 Subject: [PATCH 04/10] Fix chose -> choose typo --- docs/tutorial/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/introduction.rst b/docs/tutorial/introduction.rst index c72bbd7d..1dcc40ed 100644 --- a/docs/tutorial/introduction.rst +++ b/docs/tutorial/introduction.rst @@ -3,7 +3,7 @@ Introducing Flaskr ================== -We will call our blogging application flaskr here, feel free to chose a +We will call our blogging application flaskr here, feel free to choose a less web-2.0-ish name ;) Basically we want it to do the following things: 1. let the user sign in and out with credentials specified in the From ea2a0629c9fc3874319e98b3842365ffd889f43d Mon Sep 17 00:00:00 2001 From: Ron DuPlain Date: Wed, 4 Jul 2012 15:27:15 -0400 Subject: [PATCH 05/10] Touch up dbinit tutorial doc. Discussion on #pocoo with svenstaro, dAnjou, noob13. --- docs/tutorial/dbinit.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/tutorial/dbinit.rst b/docs/tutorial/dbinit.rst index 15a107cf..79479397 100644 --- a/docs/tutorial/dbinit.rst +++ b/docs/tutorial/dbinit.rst @@ -24,8 +24,7 @@ If you want to do that, you first have to import the :func:`contextlib.closing` function from the contextlib package. If you want to use Python 2.5 it's also necessary to enable the `with` statement first (`__future__` imports must be the very first import). Accordingly, -the following lines should be to your existing import lines in -`flaskr.py`:: +add the following lines to your existing imports in `flaskr.py`:: from __future__ import with_statement from contextlib import closing From 40ccc0a99aa9c1f975bcc7f69d452afd46fc8b90 Mon Sep 17 00:00:00 2001 From: Randall Degges Date: Fri, 20 Jul 2012 14:29:10 -0700 Subject: [PATCH 06/10] Fixing some wording in the design documentation. --- docs/design.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/design.rst b/docs/design.rst index cc247f3b..ee83840e 100644 --- a/docs/design.rst +++ b/docs/design.rst @@ -90,9 +90,9 @@ since decorators could be fired in undefined order when the application is split into multiple modules. Another design decision with the Werkzeug routing system is that routes -in Werkzeug try to ensure that there is that URLs are unique. Werkzeug -will go quite far with that in that it will automatically redirect to a -canonical URL if a route is ambiguous. +in Werkzeug try to ensure that URLs are unique. Werkzeug will go quite far +with that in that it will automatically redirect to a canonical URL if a route +is ambiguous. One Template Engine From 3800c7396b20d90ff3a84a3f26c9f12e7365a085 Mon Sep 17 00:00:00 2001 From: Ramiro Gomez Date: Sat, 21 Jul 2012 13:55:45 +0200 Subject: [PATCH 07/10] Try to correct confusing sentence in doc and fixed word duplication. --- docs/appcontext.rst | 3 +-- docs/quickstart.rst | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/appcontext.rst b/docs/appcontext.rst index e9e1ad8f..346cb09b 100644 --- a/docs/appcontext.rst +++ b/docs/appcontext.rst @@ -44,8 +44,7 @@ you can have more than one application in the same Python process. So how does the code find the “right” application? In the past we recommended passing applications around explicitly, but that caused issues -with libraries that were not designed with that in mind for libraries for -which it was too inconvenient to make this work. +with libraries that were not designed with that in mind. A common workaround for that problem was to use the :data:`~flask.current_app` proxy later on, which was bound to the current diff --git a/docs/quickstart.rst b/docs/quickstart.rst index e8b71ca9..84ffb488 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -377,7 +377,7 @@ package it's actually inside your package: /hello.html For templates you can use the full power of Jinja2 templates. Head over -to the the official `Jinja2 Template Documentation +to the official `Jinja2 Template Documentation `_ for more information. Here is an example template: From 20a542fc8ac6dadbcbac92e84fb554e00ccc897a Mon Sep 17 00:00:00 2001 From: Paul McMillan Date: Thu, 26 Jul 2012 09:56:01 -0700 Subject: [PATCH 08/10] docstring typo --- flask/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/app.py b/flask/app.py index 8460f476..9cac4025 100644 --- a/flask/app.py +++ b/flask/app.py @@ -1446,7 +1446,7 @@ class Flask(_PackageBoundObject): .. versionchanged:: 0.9 This can now also be called without a request object when the - UR adapter is created for the application context. + URL adapter is created for the application context. """ if request is not None: return self.url_map.bind_to_environ(request.environ, From ed1619adadc56641b8ab1ba2c03d45023960aaf2 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Wed, 1 Aug 2012 11:27:28 +0300 Subject: [PATCH 09/10] Docs: Mention SERVER_NAME in the url_for() docstring --- flask/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flask/helpers.py b/flask/helpers.py index 501a2f81..2e8d0da1 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -305,7 +305,9 @@ def url_for(endpoint, **values): :param endpoint: the endpoint of the URL (name of the function) :param values: the variable arguments of the URL rule - :param _external: if set to `True`, an absolute URL is generated. + :param _external: if set to `True`, an absolute URL is generated. Server + address can be changed via `SERVER_NAME` configuration variable which + defaults to `localhost`. :param _anchor: if provided this is added as anchor to the URL. :param _method: if provided this explicitly specifies an HTTP method. """ From e3b3e05052ea36456cb557b8799b7b0ed00865bd Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Wed, 1 Aug 2012 11:29:40 +0300 Subject: [PATCH 10/10] Docs: Fix docstring formatting --- flask/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/helpers.py b/flask/helpers.py index 2e8d0da1..7e20c97d 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -113,7 +113,7 @@ def stream_with_context(generator_or_function): yield '!' return Response(generate()) - Alternatively it can also be used around a specific generator: + Alternatively it can also be used around a specific generator:: from flask import stream_with_context, request, Response