From 711b041677982cbda1fa7ed9d15de6183da21d75 Mon Sep 17 00:00:00 2001 From: Ben Bangert Date: Mon, 24 Nov 2008 14:46:48 -0800 Subject: [PATCH] Doc tweaks --HG-- branch : trunk --- pylons/docs/en/forms.rst | 1 + pylons/docs/en/gettingstarted.rst | 5 ++--- pylons/docs/en/logging.rst | 6 ++++-- pylons/docs/en/testing.rst | 7 ++++++- pylons/docs/en/thirdparty/routes.rst | 1 + pylons/docs/en/views.rst | 5 ++--- pylons/templating.py | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/pylons/docs/en/forms.rst b/pylons/docs/en/forms.rst index 746f8026..a6699fda 100644 --- a/pylons/docs/en/forms.rst +++ b/pylons/docs/en/forms.rst @@ -193,6 +193,7 @@ Our form actually has two fields, an email text field and a submit button. If ex Pylons comes with an easy to use `validate` decorator, if you wish to use it import it in your `lib/base.py` like this: .. code-block:: python + # other imports from pylons.decorators import validate diff --git a/pylons/docs/en/gettingstarted.rst b/pylons/docs/en/gettingstarted.rst index 51729a91..e48b6649 100644 --- a/pylons/docs/en/gettingstarted.rst +++ b/pylons/docs/en/gettingstarted.rst @@ -199,9 +199,8 @@ The default controller will return just the string 'Hello World': import logging - from pylons import request, response, session - from pylons import tmpl_context as c - from pylons.controllers.util import abort, redirect_to, url_for + from pylons import request, response, session, tmpl_context as c + from pylons.controllers.util import abort, redirect_to from helloworld.lib.base import BaseController, render # import helloworld.model as model diff --git a/pylons/docs/en/logging.rst b/pylons/docs/en/logging.rst index 3a520bcd..4834f998 100644 --- a/pylons/docs/en/logging.rst +++ b/pylons/docs/en/logging.rst @@ -18,7 +18,8 @@ For example, in the helloworld project's hello controller import logging - from helloworld.lib.base import * + from pylons import request, response, session, tmpl_context as c + from pylons.controllers.util import abort, redirect_to log = logging.getLogger(__name__) @@ -36,7 +37,8 @@ To log messages, simply use methods available on that Logger object: import logging - from helloworld.lib.base import * + from pylons import request, response, session, tmpl_context as c + from pylons.controllers.util import abort, redirect_to log = logging.getLogger(__name__) diff --git a/pylons/docs/en/testing.rst b/pylons/docs/en/testing.rst index 096461ff..9bd44dc0 100644 --- a/pylons/docs/en/testing.rst +++ b/pylons/docs/en/testing.rst @@ -268,9 +268,14 @@ Example: assert response.email.name == 'Fred Smith' -.. see_also:: +.. seealso:: + `WebTest Documentation `_ + Documentation covering webtest and its usage + :mod:`WebTest Module docs ` + Module API reference for methods available for use when testing + the application .. _unit_testing: diff --git a/pylons/docs/en/thirdparty/routes.rst b/pylons/docs/en/thirdparty/routes.rst index 4619e821..aad8b9c8 100644 --- a/pylons/docs/en/thirdparty/routes.rst +++ b/pylons/docs/en/thirdparty/routes.rst @@ -18,4 +18,5 @@ .. automodule:: routes.util .. autofunction:: url_for +.. autoclass:: URLGenerator .. autofunction:: redirect_to diff --git a/pylons/docs/en/views.rst b/pylons/docs/en/views.rst index 63a9645f..8f522fbc 100644 --- a/pylons/docs/en/views.rst +++ b/pylons/docs/en/views.rst @@ -68,9 +68,8 @@ To pass objects to templates, the standard Pylons method is to attach them to th import logging - from pylons import request, response, session - from pylons import tmpl_context as c - from pylons.controllers.util import abort, redirect_to, url_for + from pylons import request, response, session, tmpl_context as c + from pylons.controllers.util import abort, redirect_to from helloworld.lib.base import BaseController, render # import helloworld.model as model diff --git a/pylons/templating.py b/pylons/templating.py index 35f39f01..cbba2497 100644 --- a/pylons/templating.py +++ b/pylons/templating.py @@ -75,7 +75,7 @@ def index(self): object for this request - :class:`session` -- Pylons session object (unless Sessions are removed) -- :method:`~routes.util.URLGenerator.url` -- Routes url generator +- :class:`url ` -- Routes url generator object - :class:`translator` -- Gettext translator object configured for current locale