summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-12-06 08:17:31 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-12-06 08:17:31 -0700
commitd2da2ee8333b7d134b3a50d5dd43c72ba029522f (patch)
tree1c0bc3f52263d1bb31ce216e8132abb8914bdb6f
parent4ba3856046051fcb55585ab69fc5043a50c059a1 (diff)
parentb4ddae4694c94a9b1281aab9f3ca5f21979d203b (diff)
downloadpyramid-d2da2ee8333b7d134b3a50d5dd43c72ba029522f.tar.gz
pyramid-d2da2ee8333b7d134b3a50d5dd43c72ba029522f.tar.bz2
pyramid-d2da2ee8333b7d134b3a50d5dd43c72ba029522f.zip
Merge https://github.com/Pylons/pyramid
-rw-r--r--docs/narr/webob.rst28
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst12
2 files changed, 30 insertions, 10 deletions
diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst
index 92de9d409..c4805df8d 100644
--- a/docs/narr/webob.rst
+++ b/docs/narr/webob.rst
@@ -124,19 +124,39 @@ URLs
In addition to these attributes, there are several ways to get the URL
of the request. I'll show various values for an example URL
-``http://localhost/app/?id=10``, where the application is mounted at
+``http://localhost/app/blog?id=10``, where the application is mounted at
``http://localhost/app``.
``req.url``:
The full request URL, with query string, e.g.,
- ``http://localhost/app/?id=10``
+ ``http://localhost/app/blog?id=10``
+
+``req.host``:
+ The host information in the URL, e.g.,
+ ``localhost``
+
+``req.host_url``:
+ The URL with the host, e.g., ``http://localhost``
``req.application_url``:
The URL of the application (just the SCRIPT_NAME portion of the
path, not PATH_INFO). E.g., ``http://localhost/app``
-``req.host_url``:
- The URL with the host, e.g., ``http://localhost``
+``req.path_url``:
+ The URL of the application including the PATH_INFO. e.g.,
+ ``http://localhost/app/blog``
+
+``req.path``:
+ The URL including PATH_INFO without the host or scheme. e.g.,
+ ``/app/blog``
+
+``req.path_qs``:
+ The URL including PATH_INFO and the query string. e.g,
+ ``/app/blog?id=10``
+
+``req.query_string``:
+ The query string in the URL, e.g.,
+ ``id=10``
``req.relative_url(url, to_application=False)``:
Gives a URL, relative to the current URL. If ``to_application``
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index 01fdd351e..a9f7b2282 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -19,12 +19,12 @@ an ``__init__.py`` file. Even if empty, this marks a directory as a Python
package. We use ``__init__.py`` both as a package marker and to contain
configuration code.
-When you run the application using the ``paster`` command using the
-``development.ini`` generated config file, the application configuration
-points at an Setuptools *entry point* described as ``egg:tutorial#app``. In
-our application, because the application's ``setup.py`` file says so, this
-entry point happens to be the ``app`` function within the file named
-``__init__.py``:
+The generated ``development.ini`` file is read by ``paster`` which looks for
+the application module in the ``use`` variable of the ``app:tutorial``
+section. The *entry point* is defined in the Setuptools configuration of this
+module, specifically in the ``setup.py`` file. For this tutorial, the *entry
+point* is defined as ``tutorial:main`` and points to the following ``main``
+function:
.. literalinclude:: src/basiclayout/tutorial/__init__.py
:linenos: