From 25c886ebad924786bef43cd27ce7a57d95ce3482 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 9 Apr 2014 14:46:30 -0400 Subject: - clarify Windows setuptools instructions - correct typo on location --- docs/quick_tutorial/requirements.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/requirements.rst b/docs/quick_tutorial/requirements.rst index 72bb4a4f8..b79be4b3a 100644 --- a/docs/quick_tutorial/requirements.rst +++ b/docs/quick_tutorial/requirements.rst @@ -187,9 +187,15 @@ pipe it to your environment's version of Python. $ wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | $VENV/bin/python # Windows - # Use your browser to download: - # https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.p - # ...into c:\projects\quick_tutorial\ez_setup.py + # + # Use your web browser to download this file: + # https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setupy + # + # ...and save it to: + # c:\projects\quick_tutorial\ez_setup.py + # + # Then run the following command: + c:\> %VENV%\Scripts\python ez_setup.py If ``wget`` complains with a certificate error, then run this command instead: -- cgit v1.2.3 From ca1273b6897a42d72adca8276e78458962c1b9bb Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 9 Apr 2014 16:29:55 -0400 Subject: - add name of views.py --- docs/quick_tutorial/json.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/json.rst b/docs/quick_tutorial/json.rst index ece8a61c0..aa789d833 100644 --- a/docs/quick_tutorial/json.rst +++ b/docs/quick_tutorial/json.rst @@ -40,7 +40,7 @@ Steps :linenos: #. Rather than implement a new view, we will "stack" another decorator - on the ``hello`` view: + on the ``hello`` view in ``views.py``: .. literalinclude:: json/tutorial/views.py :linenos: -- cgit v1.2.3 From c462c0770b801be06f26acdbdcc00b9b92260286 Mon Sep 17 00:00:00 2001 From: thapar Date: Wed, 9 Apr 2014 16:38:47 -0400 Subject: Typo correction "setupy"-->"setup.py" --- docs/quick_tutorial/requirements.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/requirements.rst b/docs/quick_tutorial/requirements.rst index b79be4b3a..b5778ea42 100644 --- a/docs/quick_tutorial/requirements.rst +++ b/docs/quick_tutorial/requirements.rst @@ -189,7 +189,7 @@ pipe it to your environment's version of Python. # Windows # # Use your web browser to download this file: - # https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setupy + # https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py # # ...and save it to: # c:\projects\quick_tutorial\ez_setup.py -- cgit v1.2.3 From f0398e9e32d8fee1b0f46eef0ffcc814d7e6efb0 Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 14:46:11 -0400 Subject: Update python installation instructions for mac osx. --- docs/narr/install.rst | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e419a8b20..89791115f 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -32,20 +32,32 @@ dependency will fall back to using pure Python instead. For Mac OS X Users ~~~~~~~~~~~~~~~~~~ -From `Python.org `_: +Python comes pre-installed on Mac OS X, but due to Apple's release cycle, +it is often out of date. Unless you have a need for a specific earlier version, it is recommended to +install the latest 2.x or 3.x version of Python. - Python comes pre-installed on Mac OS X, but due to Apple's release cycle, - it's often one or even two years old. The overwhelming recommendation of - the "MacPython" community is to upgrade your Python by downloading and - installing a newer version from `the Python standard release page - `_. +You can install the latest version of Python for Mac using the `homebrew `_ package manager. -It is recommended to download one of the *installer* versions, unless you -prefer to install your Python through a packgage manager (e.g., macports or -homebrew) or to build your Python from source. +To install homebrew: -Unless you have a need for a specific earlier version, it is recommended to -install the latest 2.x or 3.x version of Python. +.. code-block:: text + + $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" + +Then update the homebrew package index. + +.. code-block:: text + + $ brew update & brew doctor + +If the message says you're ready to brew, install the latest python2 or python3 using: + +.. code-block:: text + + $ brew install python + $ brew install python3 + +Alternatively, you can install it via the binaries on the `python.org `_ site. If you use an installer for your Python, then you can skip to the section :ref:`installing_unix`. -- cgit v1.2.3 From 836894d87eb2b1127b69f7eed70b770460f913ca Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 16:07:23 -0400 Subject: Update the documentation for Python installation on OSX. Binaries are primary method. --- docs/narr/install.rst | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'docs') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 89791115f..c0f633686 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -33,32 +33,19 @@ For Mac OS X Users ~~~~~~~~~~~~~~~~~~ Python comes pre-installed on Mac OS X, but due to Apple's release cycle, -it is often out of date. Unless you have a need for a specific earlier version, it is recommended to -install the latest 2.x or 3.x version of Python. +it is often out of date. Unless you have a need for a specific earlier version, +it is recommended to install the latest 2.x or 3.x version of Python. -You can install the latest version of Python for Mac using the `homebrew `_ package manager. +You can install the latest verion of Python for OSX from the binaries on +`python.org `_. -To install homebrew: - -.. code-block:: text - - $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" - -Then update the homebrew package index. - -.. code-block:: text - - $ brew update & brew doctor - -If the message says you're ready to brew, install the latest python2 or python3 using: +Alternatively, you can use the `homebrew `_ package manager. .. code-block:: text $ brew install python $ brew install python3 -Alternatively, you can install it via the binaries on the `python.org `_ site. - If you use an installer for your Python, then you can skip to the section :ref:`installing_unix`. -- cgit v1.2.3 From 8af14089b511723912063bb1b8f1471378d4a0ba Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 16:20:04 -0400 Subject: Change OSX to Mac OS X --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c0f633686..54984e6a2 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -36,7 +36,7 @@ Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it is often out of date. Unless you have a need for a specific earlier version, it is recommended to install the latest 2.x or 3.x version of Python. -You can install the latest verion of Python for OSX from the binaries on +You can install the latest verion of Python for Mac OS X from the binaries on `python.org `_. Alternatively, you can use the `homebrew `_ package manager. -- cgit v1.2.3 From abab3574569d39eeea5459eaad102eb6c7b2d7ef Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 16:44:32 -0400 Subject: adding comments for python versions --- docs/narr/install.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 54984e6a2..4ccf65c65 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -43,7 +43,10 @@ Alternatively, you can use the `homebrew `_ package manager. .. code-block:: text + # for python 2.7 $ brew install python + + # for python 3.4 $ brew install python3 If you use an installer for your Python, then you can skip to the section -- cgit v1.2.3 From a51a5627b0dda868f467588c464215d6f74a0958 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 14 Apr 2014 16:46:59 -0400 Subject: clarify python version support --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e419a8b20..a6ae7df60 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -15,8 +15,8 @@ You will need `Python `_ version 2.6 or better to run .. sidebar:: Python Versions As of this writing, :app:`Pyramid` has been tested under Python 2.6, Python - 2.7, Python 3.2, and Python 3.3. :app:`Pyramid` does not run under any - version of Python before 2.6. + 2.7, Python 3.2, Python 3.3, Python 3.4 and PyPy 2.2. :app:`Pyramid` does + not run under any version of Python before 2.6. :app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run -- cgit v1.2.3 From ac16ec2f722dcdaa45d0389ad87952bd6be6e389 Mon Sep 17 00:00:00 2001 From: westurner Date: Tue, 15 Apr 2014 01:28:03 -0500 Subject: DOC: Response.content_type defaults to text/html --- docs/narr/webob.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst index f0a4b5a0b..6a331e4bf 100644 --- a/docs/narr/webob.rst +++ b/docs/narr/webob.rst @@ -408,6 +408,8 @@ Here are some highlights: The content type *not* including the ``charset`` parameter. Typical use: ``response.content_type = 'text/html'``. + Default value: ``response.content_type = 'text/html'``. + ``response.charset``: The ``charset`` parameter of the content-type, it also informs encoding in ``response.unicode_body``. @@ -466,9 +468,12 @@ argument to the class; e.g.: from pyramid.response import Response response = Response(body='hello world!', content_type='text/plain') -The status defaults to ``'200 OK'``. The content_type does not default to -anything, though if you subclass :class:`pyramid.response.Response` and set -``default_content_type`` you can override this behavior. +The status defaults to ``'200 OK'``. + +The value of content_type defaults to +``webob.response.Response.default_content_type``; which is `text/html`. +You can subclass :class:`pyramid.response.Response` and set +``default_content_type`` to override this behavior. .. index:: single: exception responses -- cgit v1.2.3 From f1f35b771cb361a0e6e47a271292d48bf21c3cdd Mon Sep 17 00:00:00 2001 From: westurner Date: Tue, 15 Apr 2014 10:27:38 -0500 Subject: DOC: Add cgi.escape to quick_tour/views/views.py (Fixes #1294) --- docs/quick_tour/views/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tour/views/views.py b/docs/quick_tour/views/views.py index 9dc795f14..0ca1347f2 100644 --- a/docs/quick_tour/views/views.py +++ b/docs/quick_tour/views/views.py @@ -2,6 +2,7 @@ from pyramid.httpexceptions import HTTPFound from pyramid.response import Response from pyramid.view import view_config +import cgi # First view, available at http://localhost:6543/ @view_config(route_name='home') @@ -14,7 +15,7 @@ def home_view(request): def hello_view(request): name = request.params.get('name', 'No Name') body = '

Hi %s, this redirects

' - return Response(body % name) + return Response(body % cgi.escape(name)) # /goto which issues HTTP redirect to the last view -- cgit v1.2.3 From 4083b3bb431b464f330fb17e22a6465aeb6f2fe0 Mon Sep 17 00:00:00 2001 From: westurner Date: Tue, 15 Apr 2014 11:55:10 -0500 Subject: DOC: Comment re: XSS, PEP8 imports, typo --- docs/quick_tour/views/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/quick_tour/views/views.py b/docs/quick_tour/views/views.py index 0ca1347f2..1449cbb38 100644 --- a/docs/quick_tour/views/views.py +++ b/docs/quick_tour/views/views.py @@ -1,8 +1,9 @@ +import cgi + from pyramid.httpexceptions import HTTPFound from pyramid.response import Response from pyramid.view import view_config -import cgi # First view, available at http://localhost:6543/ @view_config(route_name='home') @@ -15,6 +16,7 @@ def home_view(request): def hello_view(request): name = request.params.get('name', 'No Name') body = '

Hi %s, this redirects

' + # cgi.escape to prevent Cross-Site Scripting (XSS) [CWE 79] return Response(body % cgi.escape(name)) @@ -24,7 +26,7 @@ def redirect_view(request): return HTTPFound(location="/problem") -# /problem which causes an site error +# /problem which causes a site error @view_config(route_name='exception') def exception_view(request): raise Exception() -- cgit v1.2.3 From 1aa8eb60c7d54324d8d0d31a667b3e9c4c4e3b25 Mon Sep 17 00:00:00 2001 From: tylereaves Date: Wed, 16 Apr 2014 16:13:03 -0400 Subject: Update debugtoolbar.rst Fix wording to reflect how debugtoolbar actually works --- docs/quick_tutorial/debugtoolbar.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index 1c540d8a2..88b55869e 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -71,9 +71,9 @@ supports wiring in add-on configuration via our ``development.ini`` using ``pyramid.includes``. We use this to load the configuration for the debugtoolbar. -You'll now see an attractive (and collapsible) menu in the right of -your browser, providing introspective access to debugging information. -Even better, if your web application generates an error, +You'll now see an attractive button in the right of +your browser, which you may click to provide introspective access to debugging +information in a new browser tab. Even better, if your web application generates an error, you will see a nice traceback on the screen. When you want to disable this toolbar, no need to change code: you can remove it from ``pyramid.includes`` in the relevant ``.ini`` configuration file (thus -- cgit v1.2.3 From b6ff39af94797c3b81adc367e86a546a099df519 Mon Sep 17 00:00:00 2001 From: tylereaves Date: Wed, 16 Apr 2014 16:13:33 -0400 Subject: Update debugtoolbar.rst grammar fix --- docs/quick_tutorial/debugtoolbar.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index 88b55869e..45279b541 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -71,7 +71,7 @@ supports wiring in add-on configuration via our ``development.ini`` using ``pyramid.includes``. We use this to load the configuration for the debugtoolbar. -You'll now see an attractive button in the right of +You'll now see an attractive button on the right side of your browser, which you may click to provide introspective access to debugging information in a new browser tab. Even better, if your web application generates an error, you will see a nice traceback on the screen. When you want to disable -- cgit v1.2.3 From b666df0d5f299eca20e9370ac43cddee71b6dd06 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 16 Apr 2014 15:15:50 -0500 Subject: minor tweaks based on toolbar changes in 2.x --- docs/quick_tutorial/debugtoolbar.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index 45279b541..90750c633 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -73,14 +73,15 @@ the debugtoolbar. You'll now see an attractive button on the right side of your browser, which you may click to provide introspective access to debugging -information in a new browser tab. Even better, if your web application generates an error, +information in a new browser tab. Even better, if your web application +generates an error, you will see a nice traceback on the screen. When you want to disable this toolbar, no need to change code: you can remove it from ``pyramid.includes`` in the relevant ``.ini`` configuration file (thus showing why configuration files are handy.) -Note that the toolbar mutates the HTML generated by our app and uses jQuery to -overlay itself. If you are using the toolbar while you're developing and you +Note injects a small amount of html/css into your app just before the closing +```` tag in order to display itself. If you start to experience otherwise inexplicable client-side weirdness, you can shut it off by commenting out the ``pyramid_debugtoolbar`` line in ``pyramid.includes`` temporarily. -- cgit v1.2.3 From 2af00e59d9c3e19b25e2759832efe6485a617536 Mon Sep 17 00:00:00 2001 From: flibustenet Date: Thu, 17 Apr 2014 21:52:23 +0200 Subject: More explicit example of set_property cleanup callback has a "request" parameter (and not "_") cleanup callback know (since 1.5) if an exception occurred or not (to commit or rollback) (same as #1302 on 1.5) --- docs/api/request.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/request.rst b/docs/api/request.rst index 343d0c022..c52d41400 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -319,7 +319,13 @@ def _connect(request): conn = request.registry.dbsession() - def cleanup(_): + def cleanup(request): + # since version 1.5 request.exception is not more + # eagerly cleared + if request.exception is not None: + conn.rollback() + else: + conn.commit() conn.close() request.add_finished_callback(cleanup) return conn -- cgit v1.2.3 From 268eb40ff0e21281497a954120220e41bac4a4db Mon Sep 17 00:00:00 2001 From: thapar Date: Fri, 18 Apr 2014 04:52:01 -0400 Subject: Typo fix "not"-->"no" --- docs/api/request.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/request.rst b/docs/api/request.rst index c52d41400..b28ec5ffc 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -320,7 +320,7 @@ def _connect(request): conn = request.registry.dbsession() def cleanup(request): - # since version 1.5 request.exception is not more + # since version 1.5, request.exception is no more # eagerly cleared if request.exception is not None: conn.rollback() -- cgit v1.2.3 From 070d7a6abc67e942abffc6645d1efdcfb3b6dafe Mon Sep 17 00:00:00 2001 From: thapar Date: Fri, 18 Apr 2014 11:42:01 -0400 Subject: Corrected the comment's language --- docs/api/request.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/api/request.rst b/docs/api/request.rst index b28ec5ffc..77d80f6d6 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -320,8 +320,8 @@ def _connect(request): conn = request.registry.dbsession() def cleanup(request): - # since version 1.5, request.exception is no more - # eagerly cleared + # since version 1.5, request.exception is no + # longer eagerly cleared if request.exception is not None: conn.rollback() else: -- cgit v1.2.3 From ef7a4e90de2f78a57e4a3326072f8b40b449182c Mon Sep 17 00:00:00 2001 From: Omid Raha Date: Sun, 20 Apr 2014 17:14:45 +0430 Subject: Remove repeated word. Remove repeated `operations` word. --- docs/quick_tutorial/more_view_classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/more_view_classes.rst b/docs/quick_tutorial/more_view_classes.rst index 1e5603554..9cc4cc520 100644 --- a/docs/quick_tutorial/more_view_classes.rst +++ b/docs/quick_tutorial/more_view_classes.rst @@ -34,7 +34,7 @@ that determine which view is matched to a request, based on factors such as the request method, the form parameters, etc. These predicates provide many axes of flexibility. -The following shows a simple example with four operations operations: +The following shows a simple example with four operations: view a home page which leads to a form, save a change, and press the delete button. -- cgit v1.2.3 From 872796d2c1743430ab04364d05657b46133fa230 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 20 Apr 2014 06:50:44 -0700 Subject: Merge pull request #1309 from omidraha/patch-1 Correct question to adapt to the the text. --- docs/quick_tutorial/jinja2.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/jinja2.rst b/docs/quick_tutorial/jinja2.rst index 44d9f635b..2f1e295dd 100644 --- a/docs/quick_tutorial/jinja2.rst +++ b/docs/quick_tutorial/jinja2.rst @@ -88,9 +88,9 @@ Extra Credit dependency manually. What is another way we could have made the association? -#. We used ``development.ini`` to get the :term:`configurator` to - load ``pyramid_jinja2``'s configuration. What is another way could - include it into the config? +#. We used ``config.include`` which is an imperative configuration to get the + :term:`Configurator` to load ``pyramid_jinja2``'s configuration. + What is another way could include it into the config? .. seealso:: `Jinja2 homepage `_, and -- cgit v1.2.3 From e5346a5dae13357917b7a91472e129a8841e79c9 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 21 Apr 2014 14:37:30 -0700 Subject: Update background section same as quick_tour.rst Update text of ``background`` section same as ``sessions`` section of ``quick_tour.rst`` --- docs/quick_tutorial/sessions.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/sessions.rst b/docs/quick_tutorial/sessions.rst index 0f284e9a7..b4887beb8 100644 --- a/docs/quick_tutorial/sessions.rst +++ b/docs/quick_tutorial/sessions.rst @@ -13,10 +13,10 @@ When people use your web application, they frequently perform a task that requires semi-permanent data to be saved. For example, a shopping cart. This is called a :term:`session`. -Pyramid has basic built-in support for sessions, with add-ons -or your own custom sessioning engine) that can provide -richer session support. Let's take a look at the -:ref:`built-in sessioning support `. +Pyramid has basic built-in support for sessions. Third party packages such as +``pyramid_redis_sessions`` provide richer session support. Or you can create +your own custom sessioning engine. Let's take a look at the +:doc:`built-in sessioning support <../narr/sessions>`. Objectives ========== -- cgit v1.2.3 From de2721019b20452217062a8fa447c60816d5e336 Mon Sep 17 00:00:00 2001 From: Omid Raha Date: Wed, 23 Apr 2014 15:27:26 +0430 Subject: Remove repeated word. Remove repeated `use` word. --- docs/whatsnew-1.5.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/whatsnew-1.5.rst b/docs/whatsnew-1.5.rst index 65e8393f8..455822aaa 100644 --- a/docs/whatsnew-1.5.rst +++ b/docs/whatsnew-1.5.rst @@ -386,7 +386,7 @@ Other Backwards Incompatibilities - If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or any number of slashes), the trailing slash(es) will be removed before a URL - is generated when you use use :meth:`~pyramid.request.Request.resource_url` + is generated when you use :meth:`~pyramid.request.Request.resource_url` or :meth:`~pyramid.request.Request.resource_path`. Previously the virtual root path would not have trailing slashes stripped, which would influence URL generation. -- cgit v1.2.3 From cb06eb02b145f7471b66b5fb2a5c031efd9575b7 Mon Sep 17 00:00:00 2001 From: Omid Raha Date: Thu, 24 Apr 2014 00:17:53 +0430 Subject: Improving `X-Vhm-Root` paragraphs. Improving text of `X-Vhm-Root` paragraphs in `Other Backwards Incompatibilities` section. --- docs/whatsnew-1.5.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/whatsnew-1.5.rst b/docs/whatsnew-1.5.rst index 455822aaa..1d863c937 100644 --- a/docs/whatsnew-1.5.rst +++ b/docs/whatsnew-1.5.rst @@ -384,8 +384,8 @@ Other Backwards Incompatibilities are now "reified" properties that look up a locale name and localizer respectively using the machinery described in :ref:`i18n_chapter`. -- If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or - any number of slashes), the trailing slash(es) will be removed before a URL +- If you send an ``X-Vhm-Root`` header with a value that ends with any number + of slashes, the trailing slashes will be removed before the URL is generated when you use :meth:`~pyramid.request.Request.resource_url` or :meth:`~pyramid.request.Request.resource_path`. Previously the virtual root path would not have trailing slashes stripped, which would influence URL -- cgit v1.2.3 From cef139b9c2f163694968ae5b7efe7eae07e72c04 Mon Sep 17 00:00:00 2001 From: bobby Date: Wed, 23 Apr 2014 23:04:00 -0700 Subject: Typo found in second Declarative code block There were two import statements for Configurator. I removed the second import statement in the "__main__" since most of the documentation declares all imports on the top of the source. modified: configuration.rst --- docs/narr/configuration.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'docs') diff --git a/docs/narr/configuration.rst b/docs/narr/configuration.rst index f7a69d613..52615533d 100644 --- a/docs/narr/configuration.rst +++ b/docs/narr/configuration.rst @@ -114,7 +114,6 @@ in a package and its subpackages. For example: return Response('Hello') if __name__ == '__main__': - from pyramid.config import Configurator config = Configurator() config.scan() app = config.make_wsgi_app() -- cgit v1.2.3 From 306c298d897acb5b751fa7dc0b8081b48007686f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 1 May 2014 13:34:17 -0500 Subject: fix #1253 --- docs/narr/viewconfig.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index adc53bd11..a0feef8d7 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -295,11 +295,14 @@ configured view. *This is an advanced feature, not often used by "civilians"*. ``request_method`` - This value can be a string (typically ``"GET"``, ``"POST"``, ``"PUT"``, - ``"DELETE"``, or ``"HEAD"``) representing an HTTP ``REQUEST_METHOD``. A view - declaration with this argument ensures that the view will only be called - when the request's ``method`` attribute (aka the ``REQUEST_METHOD`` of the - WSGI environment) string matches the supplied value. + This value can be either a string (such as ``"GET"``, ``"POST"``, + ``"PUT"``, ``"DELETE"``, ``"HEAD"`` or ``"OPTIONS"``) representing an + HTTP ``REQUEST_METHOD``, or a tuple containing one or more of these + strings. A view declaration with this argument ensures that the + view will only be called when the ``method`` attribute of the + request (aka the ``REQUEST_METHOD`` of the WSGI environment) matches + a supplied value. Note that use of ``"GET"`` also implies that the + view will respond to ``"HEAD"`` as of Pyramid 1.4. If ``request_method`` is not supplied, the view will be invoked regardless of the ``REQUEST_METHOD`` of the :term:`WSGI` environment. -- cgit v1.2.3 From 7096d92efd27b96ae48c798a207905f4c38b13c5 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 3 May 2014 22:34:53 -0700 Subject: - spelling --- docs/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/glossary.rst b/docs/glossary.rst index 2cc461a77..deb4c1c8b 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -936,7 +936,7 @@ Glossary `Akhet `_ is a Pyramid library and demo application with a Pylons-like feel. It's most known for its former application scaffold, which helped - users transition from Pylons and those prefering a more Pylons-like API. + users transition from Pylons and those preferring a more Pylons-like API. The scaffold has been retired but the demo plays a similar role. Pyramid Cookbook -- cgit v1.2.3 From c6c8c5ce12bceaf34a3950c2ee51e2961acaef67 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 3 May 2014 22:41:51 -0700 Subject: - add cookbook to intersphinx mapping --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index eba776628..d15b1270e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,6 +58,7 @@ extensions = [ # Looks for objects in external projects intersphinx_mapping = { 'tutorials': ('http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/', None), + 'cookbook': ('http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/', None), 'jinja2': ('http://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/', None), 'tm': ( 'http://docs.pylonsproject.org/projects/pyramid_tm/en/latest/', -- cgit v1.2.3 From fc4740061c65692f6d2f23585f5efeff515cff99 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 3 May 2014 22:46:35 -0700 Subject: - looks like _ are now - in RTD --- docs/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index d15b1270e..4bc8e2172 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,9 +57,9 @@ extensions = [ # Looks for objects in external projects intersphinx_mapping = { - 'tutorials': ('http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/', None), - 'cookbook': ('http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/', None), - 'jinja2': ('http://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/', None), + 'tutorials': ('http://docs.pylonsproject.org/projects/pyramid-tutorials/en/latest/', None), + 'cookbook': ('http://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/', None), + 'jinja2': ('http://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/', None), 'tm': ( 'http://docs.pylonsproject.org/projects/pyramid_tm/en/latest/', None, @@ -83,10 +83,10 @@ intersphinx_mapping = { 'venusian': ('http://docs.pylonsproject.org/projects/venusian/en/latest', None), 'toolbar': - ('http://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest', + ('http://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest', None), 'zcml': - ('http://docs.pylonsproject.org/projects/pyramid_zcml/en/latest', + ('http://docs.pylonsproject.org/projects/pyramid-zcml/en/latest', None), } -- cgit v1.2.3 From 0f14d8db1b7ca13f62e967305e3583ff4b74abb1 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 3 May 2014 23:12:48 -0700 Subject: - add a reference --- docs/index.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/index.rst b/docs/index.rst index 78a00966d..ac16ff237 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -119,6 +119,8 @@ Narrative documentation in chapter form explaining how to use narr/threadlocals narr/zca +.. _html_tutorials: + Tutorials ========= -- cgit v1.2.3