From 55045affb9cded9e79c7dfc4e3682b006d270398 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 5 May 2011 20:13:20 -0500 Subject: Fixed a bug in the wiki2/auth tutorial. --- docs/tutorials/wiki2/src/authorization/tutorial/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials') diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py b/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py index e8baa568c..05183d3d4 100644 --- a/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py +++ b/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py @@ -27,8 +27,8 @@ def main(global_config, **settings): config.add_route('view_page', '/{pagename}') config.add_route('add_page', '/add_page/{pagename}') config.add_route('edit_page', '/{pagename}/edit_page') - config.add_route('view_wiki', '/') + config.add_view('tutorial.views.view_wiki', route_name='view_wiki') config.add_view('tutorial.login.login', route_name='login', renderer='tutorial:templates/login.pt') config.add_view('tutorial.login.logout', route_name='logout') -- cgit v1.2.3 From bb84f4866d9023f10b2403f97074b9add3787d29 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 5 May 2011 20:31:17 -0500 Subject: Fixed some line numbers in the docs. --- docs/tutorials/wiki2/authorization.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'docs/tutorials') diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index 19d438fad..b1d3b0001 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -94,8 +94,7 @@ Note that that the :class:`pyramid.authentication.AuthTktAuthenticationPolicy` constructor accepts two arguments: ``secret`` and ``callback``. ``secret`` is a string representing an encryption key used by the "authentication ticket" machinery -represented by this policy: it is required. The ``callback`` is a string, -representing a :term:`dotted Python name`, which points at the +represented by this policy: it is required. The ``callback`` is a ``groupfinder`` function in the current directory's ``security.py`` file. We haven't added that module yet, but we're about to. @@ -104,7 +103,7 @@ We'll also change ``__init__.py``, adding a call to :term:`view callable`. This is also known as a :term:`forbidden view`: .. literalinclude:: src/authorization/tutorial/__init__.py - :lines: 24-26,41-43 + :lines: 41-43 :linenos: :language: python @@ -114,7 +113,7 @@ A forbidden view configures our newly created login view to show up when A ``logout`` :term:`view callable` will allow users to log out later: .. literalinclude:: src/authorization/tutorial/__init__.py - :lines: 27-28 + :lines: 26,34 :linenos: :language: python -- cgit v1.2.3