summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-28 22:41:03 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-28 22:41:03 +0000
commit44f1df7b7cec671fec92ead513804e52e63eb76d (patch)
tree98d95fc68b2c826034178d8c19c119bf0070e110 /docs/tutorials
parentf2086c23b03717ead05ca3a512091e302534c002 (diff)
downloadpyramid-44f1df7b7cec671fec92ead513804e52e63eb76d.tar.gz
pyramid-44f1df7b7cec671fec92ead513804e52e63eb76d.tar.bz2
pyramid-44f1df7b7cec671fec92ead513804e52e63eb76d.zip
Fix overlong lines.
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/bfgwiki/authorization.rst40
-rw-r--r--docs/tutorials/bfgwiki/basiclayout.rst5
-rw-r--r--docs/tutorials/bfgwiki/definingmodels.rst8
-rw-r--r--docs/tutorials/bfgwiki/distributing.rst50
-rw-r--r--docs/tutorials/bfgwiki2/authorization.rst11
-rw-r--r--docs/tutorials/bfgwiki2/distributing.rst49
-rw-r--r--docs/tutorials/bfgwiki2/installation.rst4
-rw-r--r--docs/tutorials/bfgwiki2/src/views/tutorial/templates/view.pt3
-rw-r--r--docs/tutorials/gae/index.rst38
-rw-r--r--docs/tutorials/zeo/index.rst11
10 files changed, 47 insertions, 172 deletions
diff --git a/docs/tutorials/bfgwiki/authorization.rst b/docs/tutorials/bfgwiki/authorization.rst
index 52e7cc528..13443ca53 100644
--- a/docs/tutorials/bfgwiki/authorization.rst
+++ b/docs/tutorials/bfgwiki/authorization.rst
@@ -209,33 +209,29 @@ Viewing the Application in a Browser
We can finally examine our application in a browser. The views we'll
try are as follows:
-- Visiting `http://localhost:6543/ <http://localhost:6543/>`_ in a
- browser invokes the ``view_wiki`` view. This always redirects to
- the ``view_page`` view of the FrontPage page object. It is
- executable by any user.
-
-- Visiting `http://localhost:6543/FrontPage/
- <http://localhost:6543/FrontPage/>`_ in a browser invokes the
- ``view_page`` view of the front page page object. This is because
- it's the :term:`default view` (a view without a ``name``) for
- ``Page`` objects. It is executable by any user.
-
-- Visiting `http://localhost:6543/FrontPage/edit_page
- <http://localhost:6543/FrontPage/edit_page>`_ in a browser invokes
- the edit view for the front page object. It is executable by only
+- Visiting ``http://localhost:6543/`` in a browser invokes the
+ ``view_wiki`` view. This always redirects to the ``view_page`` view
+ of the FrontPage page object. It is executable by any user.
+
+- Visiting ``http://localhost:6543/FrontPage/`` in a browser invokes
+ the ``view_page`` view of the front page page object. This is
+ because it's the :term:`default view` (a view without a ``name``)
+ for ``Page`` objects. It is executable by any user.
+
+- Visiting ``http://localhost:6543/FrontPage/edit_page`` in a browser
+ invokes the edit view for the front page object. It is executable
+ by only the ``editor`` user. If a different user (or the anonymous
+ user) invokes it, a login form will be displayed. Supplying the
+ credentials with the username ``editor``, password ``editor`` will
+ show the edit page form being displayed.
+
+- Visiting ``http://localhost:6543/add_page/SomePageName`` in a
+ browser invokes the add view for a page. It is executable by only
the ``editor`` user. If a different user (or the anonymous user)
invokes it, a login form will be displayed. Supplying the
credentials with the username ``editor``, password ``editor`` will
show the edit page form being displayed.
-- Visiting `http://localhost:6543/add_page/SomePageName
- <http://localhost:6543/add_page/SomePageName>`_ in a browser invokes
- the add view for a page. It is executable by only the ``editor``
- user. If a different user (or the anonymous user) invokes it, a
- login form will be displayed. Supplying the credentials with the
- username ``editor``, password ``editor`` will show the edit page
- form being displayed.
-
Seeing Our Changes To ``views.py`` and our Templates
----------------------------------------------------
diff --git a/docs/tutorials/bfgwiki/basiclayout.rst b/docs/tutorials/bfgwiki/basiclayout.rst
index f0b7d963c..5934799b9 100644
--- a/docs/tutorials/bfgwiki/basiclayout.rst
+++ b/docs/tutorials/bfgwiki/basiclayout.rst
@@ -110,9 +110,8 @@ function within the file named ``run.py``:
(something like ``file:///path/to/Data.fs``).
#. *Line 14*. We create a "finder" object using the
- ``repoze.zodbconn.finder.PersistentApplicationFinder`` helper
- class, passing it the ZODB URI and the "appmaker" we've imported
- from ``models.py``.
+ ``PersistentApplicationFinder`` helper class, passing it the ZODB
+ URI and the "appmaker" we've imported from ``models.py``.
#. *Lines 15 - 16*. We create a :term:`root factory` which uses the
finder to return a ZODB root object.
diff --git a/docs/tutorials/bfgwiki/definingmodels.rst b/docs/tutorials/bfgwiki/definingmodels.rst
index ef5798362..effbaa4bf 100644
--- a/docs/tutorials/bfgwiki/definingmodels.rst
+++ b/docs/tutorials/bfgwiki/definingmodels.rst
@@ -71,10 +71,10 @@ Add an Appmaker
---------------
We're using a mini-framework callable named
-``repoze.zodbconn.finder.PersistentApplicationFinder`` in our
-application (see ``run.py``). A ``PersistentApplicationFinder``
-accepts a ZODB URL as well as an "appmaker" callback. This callback
-typically lives in the ``models.py`` file.
+``PersistentApplicationFinder`` in our application (see ``run.py``).
+A ``PersistentApplicationFinder`` accepts a ZODB URL as well as an
+"appmaker" callback. This callback typically lives in the
+``models.py`` file.
We want to change the appmaker function in our ``models.py`` file so
that our application root is a Wiki instance, and we'll also slot a
diff --git a/docs/tutorials/bfgwiki/distributing.rst b/docs/tutorials/bfgwiki/distributing.rst
index 06d126a64..3ed84a892 100644
--- a/docs/tutorials/bfgwiki/distributing.rst
+++ b/docs/tutorials/bfgwiki/distributing.rst
@@ -6,7 +6,7 @@ Once your application works properly, you can create a "tarball" from
it by using the ``setup.py sdist`` command. The following commands
assume your current working directory is the ``tutorial`` package
we've created and that the parent directory of the ``tutorial``
-package is a virtualenv representing a BFG environment.
+package is a virtualenv representing a :mod:`repoze.bfg` environment.
On UNIX:
@@ -32,53 +32,7 @@ The output of such a command will be something like:
.. code-block:: text
running sdist
- running egg_info
- writing requirements to tutorial.egg-info/requires.txt
- writing tutorial.egg-info/PKG-INFO
- writing top-level names to tutorial.egg-info/top_level.txt
- writing dependency_links to tutorial.egg-info/dependency_links.txt
- writing entry points to tutorial.egg-info/entry_points.txt
- writing manifest file 'tutorial.egg-info/SOURCES.txt'
- warning: sdist: missing required meta-data: url
- warning: sdist: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied
- creating tutorial-0.1
- creating tutorial-0.1/tutorial
- creating tutorial-0.1/tutorial.egg-info
- creating tutorial-0.1/tutorial/templates
- creating tutorial-0.1/tutorial/templates/static
- creating tutorial-0.1/tutorial/templates/static/images
- making hard links in tutorial-0.1...
- hard linking CHANGES.txt -> tutorial-0.1
- hard linking README.txt -> tutorial-0.1
- hard linking setup.cfg -> tutorial-0.1
- hard linking setup.py -> tutorial-0.1
- hard linking tutorial.ini -> tutorial-0.1
- hard linking tutorial/__init__.py -> tutorial-0.1/tutorial
- hard linking tutorial/configure.zcml -> tutorial-0.1/tutorial
- hard linking tutorial/models.py -> tutorial-0.1/tutorial
- hard linking tutorial/run.py -> tutorial-0.1/tutorial
- hard linking tutorial/tests.py -> tutorial-0.1/tutorial
- hard linking tutorial/views.py -> tutorial-0.1/tutorial
- hard linking tutorial.egg-info/PKG-INFO -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/SOURCES.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/dependency_links.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/entry_points.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/not-zip-safe -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/requires.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/top_level.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial/templates/edit.pt -> tutorial-0.1/tutorial/templates
- hard linking tutorial/templates/mytemplate.pt -> tutorial-0.1/tutorial/templates
- hard linking tutorial/templates/view.pt -> tutorial-0.1/tutorial/templates
- hard linking tutorial/templates/static/default.css -> tutorial-0.1/tutorial/templates/static
- hard linking tutorial/templates/static/style.css -> tutorial-0.1/tutorial/templates/static
- hard linking tutorial/templates/static/templatelicense.txt -> tutorial-0.1/tutorial/templates/static
- hard linking tutorial/templates/static/images/img01.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/img02.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/img03.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/img04.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/spacer.gif -> tutorial-0.1/tutorial/templates/static/images
- copying setup.cfg -> tutorial-0.1
- Writing tutorial-0.1/setup.cfg
+ # .. more output ..
creating dist
tar -cf dist/tutorial-0.1.tar tutorial-0.1
gzip -f9 dist/tutorial-0.1.tar
diff --git a/docs/tutorials/bfgwiki2/authorization.rst b/docs/tutorials/bfgwiki2/authorization.rst
index 3f0aed342..ea4c7b4e4 100644
--- a/docs/tutorials/bfgwiki2/authorization.rst
+++ b/docs/tutorials/bfgwiki2/authorization.rst
@@ -78,12 +78,11 @@ Changing ``configure.zcml``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
We'll change our ``configure.zcml`` file to enable an
-:class:`repoze.bfg.authentication.AuthTktAuthenticationPolicy` and an
-:class:`repoze.bfg.authorization.ACLAuthorizationPolicy` to enable
-declarative security checking. We'll also change ``configure.zcml``
-to add a ``forbidden`` stanza which points at our ``login``
-:term:`view callable`, also known as a :term:`forbidden view`. This
-configures our newly created login view to show up when
+``AuthTktAuthenticationPolicy`` and an ``ACLAuthorizationPolicy`` to
+enable declarative security checking. We'll also change
+``configure.zcml`` to add a ``forbidden`` stanza which points at our
+``login`` :term:`view callable`, also known as a :term:`forbidden
+view`. This configures our newly created login view to show up when
:mod:`repoze.bfg` detects that a view invocation can not be
authorized. Also, we'll add ``view_permission`` attributes with the
value ``edit`` to the ``edit_page`` and ``add_page`` route
diff --git a/docs/tutorials/bfgwiki2/distributing.rst b/docs/tutorials/bfgwiki2/distributing.rst
index c21cc1417..22013a0fb 100644
--- a/docs/tutorials/bfgwiki2/distributing.rst
+++ b/docs/tutorials/bfgwiki2/distributing.rst
@@ -32,54 +32,7 @@ The output of such a command will be something like:
.. code-block:: text
running sdist
- running egg_info
- writing requirements to tutorial.egg-info/requires.txt
- writing tutorial.egg-info/PKG-INFO
- writing top-level names to tutorial.egg-info/top_level.txt
- writing dependency_links to tutorial.egg-info/dependency_links.txt
- writing entry points to tutorial.egg-info/entry_points.txt
- writing manifest file 'tutorial.egg-info/SOURCES.txt'
- warning: sdist: missing required meta-data: url
- warning: sdist: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied
- creating tutorial-0.1
- creating tutorial-0.1/tutorial
- creating tutorial-0.1/tutorial.egg-info
- creating tutorial-0.1/tutorial/templates
- creating tutorial-0.1/tutorial/templates/static
- creating tutorial-0.1/tutorial/templates/static/images
- making hard links in tutorial-0.1...
- hard linking CHANGES.txt -> tutorial-0.1
- hard linking README.txt -> tutorial-0.1
- hard linking ez_setup.py -> tutorial-0.1
- hard linking setup.cfg -> tutorial-0.1
- hard linking setup.py -> tutorial-0.1
- hard linking tutorial.ini -> tutorial-0.1
- hard linking tutorial/__init__.py -> tutorial-0.1/tutorial
- hard linking tutorial/configure.zcml -> tutorial-0.1/tutorial
- hard linking tutorial/models.py -> tutorial-0.1/tutorial
- hard linking tutorial/run.py -> tutorial-0.1/tutorial
- hard linking tutorial/tests.py -> tutorial-0.1/tutorial
- hard linking tutorial/views.py -> tutorial-0.1/tutorial
- hard linking tutorial.egg-info/PKG-INFO -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/SOURCES.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/dependency_links.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/entry_points.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/not-zip-safe -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/requires.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial.egg-info/top_level.txt -> tutorial-0.1/tutorial.egg-info
- hard linking tutorial/templates/edit.pt -> tutorial-0.1/tutorial/templates
- hard linking tutorial/templates/mytemplate.pt -> tutorial-0.1/tutorial/templates
- hard linking tutorial/templates/view.pt -> tutorial-0.1/tutorial/templates
- hard linking tutorial/templates/static/default.css -> tutorial-0.1/tutorial/templates/static
- hard linking tutorial/templates/static/style.css -> tutorial-0.1/tutorial/templates/static
- hard linking tutorial/templates/static/templatelicense.txt -> tutorial-0.1/tutorial/templates/static
- hard linking tutorial/templates/static/images/img01.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/img02.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/img03.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/img04.gif -> tutorial-0.1/tutorial/templates/static/images
- hard linking tutorial/templates/static/images/spacer.gif -> tutorial-0.1/tutorial/templates/static/images
- copying setup.cfg -> tutorial-0.1
- Writing tutorial-0.1/setup.cfg
+ # ... more output ...
creating dist
tar -cf dist/tutorial-0.1.tar tutorial-0.1
gzip -f9 dist/tutorial-0.1.tar
diff --git a/docs/tutorials/bfgwiki2/installation.rst b/docs/tutorials/bfgwiki2/installation.rst
index ad5443288..689df9858 100644
--- a/docs/tutorials/bfgwiki2/installation.rst
+++ b/docs/tutorials/bfgwiki2/installation.rst
@@ -251,8 +251,8 @@ On Windows:
.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial --cover-erase \
- --with-coverage
+ c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
+ --cover-erase --with-coverage
Looks like our package's ``models`` module doesn't quite have 100%
test coverage.
diff --git a/docs/tutorials/bfgwiki2/src/views/tutorial/templates/view.pt b/docs/tutorials/bfgwiki2/src/views/tutorial/templates/view.pt
index 774daae5d..f5037195f 100644
--- a/docs/tutorials/bfgwiki2/src/views/tutorial/templates/view.pt
+++ b/docs/tutorials/bfgwiki2/src/views/tutorial/templates/view.pt
@@ -6,7 +6,8 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <title>${page.name} - bfg tutorial wiki (based on TurboGears 20-Minute Wiki)</title>
+ <title>${page.name} - bfg tutorial wiki
+ (based on TurboGears 20-Minute Wiki)</title>
<link rel="stylesheet" type="text/css"
href="${request.application_url}/static/style.css" />
</head>
diff --git a/docs/tutorials/gae/index.rst b/docs/tutorials/gae/index.rst
index cf78896bb..bf77ac6da 100644
--- a/docs/tutorials/gae/index.rst
+++ b/docs/tutorials/gae/index.rst
@@ -124,13 +124,10 @@ system.
.. code-block:: text
- [chrism@vitaminf bfg_gae]$ python2.5 /usr/local/bin/dev_appserver.py bfgapp/app/INFO 2009-05-03 22:23:13,887 appengine_rpc.py:157] Server: appengine.google.com
- INFO 2009-05-03 22:23:13,898 appcfg.py:320] Checking for updates to the SDK.
- INFO 2009-05-03 22:23:14,034 appcfg.py:334] The SDK is up to date.
- WARNING 2009-05-03 22:23:14,035 datastore_file_stub.py:368] Could not read datastore data from /var/folders/dB/dByJ-qkiE6igZD4Yrm+nMk+++TI/-Tmp-/dev_appserver.datastore
- WARNING 2009-05-03 22:23:14,035 datastore_file_stub.py:368] Could not read datastore data from /var/folders/dB/dByJ-qkiE6igZD4Yrm+nMk+++TI/-Tmp-/dev_appserver.datastore.history
- WARNING 2009-05-03 22:23:14,045 dev_appserver.py:3240] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
- INFO 2009-05-03 22:23:14,050 dev_appserver_main.py:463] Running application bfgapp on port 8080: http://localhost:8080
+ [chrism@vitaminf bfg_gae]$ python2.5 /usr/local/bin/dev_appserver.py \
+ bfgapp/app/
+ INFO 2009-05-03 22:23:13,887 appengine_rpc.py:157] # ... more...
+ Running application bfgapp on port 8080: http://localhost:8080
You may need to run "Make Symlinks" from the Google App Engine
Launcher GUI application if your system doesn't already have the
@@ -189,36 +186,17 @@ system.
.. code-block:: text
- [chrism@vitaminf bfgapp]$ python2.5 /usr/local/bin/appcfg.py update ../bfgapp/app/
+ [chrism@vitaminf bfgapp]$ python2.5 /usr/local/bin/appcfg.py update \
+ ../bfgapp/app/
Scanning files on local disk.
Scanned 500 files.
- Scanned 1000 files.
- Initiating update.
- Cloning 761 application files.
- Cloned 100 files.
- Cloned 200 files.
- Cloned 300 files.
- Cloned 400 files.
- Cloned 500 files.
- Cloned 600 files.
- Cloned 700 files.
- Uploading 12 files.
- Deploying new version.
- Checking if new version is ready to serve.
- Will check again in 1 seconds.
- Checking if new version is ready to serve.
- Will check again in 2 seconds.
- Checking if new version is ready to serve.
- Will check again in 4 seconds.
- Checking if new version is ready to serve.
- Will check again in 8 seconds.
- Checking if new version is ready to serve.
+ # ... more output ...
Will check again in 16 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.
-#. Visit "<yourapp>.appspot.com" in a browser.
+#. Visit ``http://<yourapp>.appspot.com`` in a browser.
.. _pip_zip:
diff --git a/docs/tutorials/zeo/index.rst b/docs/tutorials/zeo/index.rst
index 70dbdd6e0..e2d9953c2 100644
--- a/docs/tutorials/zeo/index.rst
+++ b/docs/tutorials/zeo/index.rst
@@ -200,13 +200,7 @@ Running
[chrism@snowpro myapp]$ ../bin/runzeo -C zeo.conf
------
2009-09-19T13:48:41 INFO ZEO.runzeo (9910) created PID file './zeo.pid'
- ------
- 2009-09-19T13:48:41 INFO ZEO.runzeo (9910) opening storage '1' using BlobStorage
- ------
- 2009-09-19T13:48:41 WARNING ZODB.FileStorage Ignoring index for ./myapp.db
- ------
- 2009-09-19T13:48:41 INFO ZEO.StorageServer (9910) StorageServer created RW with storages: 1:RW:./myapp.db
- ------
+ # ... more output ...
2009-09-19T13:48:41 INFO ZEO.zrpc (9910) listening on ./zeo.sock
#. While the ZEO server is running, start the application server:
@@ -228,7 +222,8 @@ Running
.. code-block:: text
:linenos:
- [chrism@snowpro sess]$ ../bin/paster --plugin=repoze.bfg bfgshell myapp.ini myapp
+ [chrism@snowpro sess]$ ../bin/paster --plugin=repoze.bfg bfgshell \
+ myapp.ini myapp
Python 2.5.4 (r254:67916, Sep 4 2009, 02:12:16)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help" for more information. "root" is the BFG app root object.