diff options
author | Ryan Petrello <lists@ryanpetrello.com> | 2011-09-02 17:27:21 -0400 |
---|---|---|
committer | Ryan Petrello <lists@ryanpetrello.com> | 2011-09-02 17:27:21 -0400 |
commit | 7eb1a7d7f05fc5f6c4009951c2eb20721a5105fb (patch) | |
tree | be650053fba892cddb35c04d21d839da3a78621e | |
parent | 678167d9d6e22d3c5c793844f1c5b91f0cf61312 (diff) | |
download | pecan-7eb1a7d7f05fc5f6c4009951c2eb20721a5105fb.tar.gz |
More misc. documentation updates.
-rw-r--r-- | docs/source/hooks.rst | 6 | ||||
-rw-r--r-- | docs/source/index.rst | 5 | ||||
-rw-r--r-- | docs/source/jsonify.rst | 6 |
3 files changed, 7 insertions, 10 deletions
diff --git a/docs/source/hooks.rst b/docs/source/hooks.rst index 57a3427..99052cb 100644 --- a/docs/source/hooks.rst +++ b/docs/source/hooks.rst @@ -85,7 +85,7 @@ the app and browse the application from our web browser:: Included Pecan Hooks -==================== +-------------------- Pecan includes some hooks in its core and are very simple to start using them away. This section will describe their different uses, how to configure them and examples of common scenarios. @@ -93,7 +93,7 @@ and examples of common scenarios. .. _requestviewerhook: RequestViewerHook -================= +----------------- This hooks is very useful for debugging purposes. It has access to every attribute the ``response`` object has plus a few others that are specific to the framework. @@ -250,7 +250,7 @@ And these are the specific ones from Pecan and the hook: Blacklisting ------------ -Sometimes is annoying to get information about *every* single request. For this +Sometimes it's annoying to get information about *every* single request. For this purpose, there is a matching list of url paths that you can pass into the hook so that paths that do not match are returned. diff --git a/docs/source/index.rst b/docs/source/index.rst index eb38f8b..229795d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -55,16 +55,13 @@ lines of code. Cookbook ======== -We provide a couple of easy ways to get started including a short -tutorial on App Engine. - .. toctree:: :maxdepth: 2 - app_engine.rst sessions.rst databases.rst deployment.rst + app_engine.rst API Documentation diff --git a/docs/source/jsonify.rst b/docs/source/jsonify.rst index 2a75e32..31bde69 100644 --- a/docs/source/jsonify.rst +++ b/docs/source/jsonify.rst @@ -5,14 +5,14 @@ JSON Support ============ Pecan includes a simple, easy-to-use system for generating and serving ``JSON``. To get started, create a file in your project called -``json.py`` which should be imported in your ``app.py``. +``json.py`` and import it in your project's ``app.py``. Your ``json`` module will contain a series of rules for generating ``JSON`` from objects you return in your controller, utilizing "generic" function support from the `simplegeneric <http://pypi.python.org/pypi/simplegeneric>`_ library. -Let us imagine that we have a controller in our Pecan application which +Let's say that we have a controller in our Pecan application which we want to use to return ``JSON`` output for a ``User`` object:: from myproject.lib import get_current_user @@ -68,4 +68,4 @@ specifying a ``__json__`` method on the object:: The benefit of using a ``json.py`` module is having all of your ``JSON`` rules defined in a central location, but some projects prefer the simplicity of keeping the ``JSON`` rules attached directly to their -model objects.
\ No newline at end of file +model objects. |