diff options
| author | Chris McDonough <chrism@plope.com> | 2010-10-25 17:38:13 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-10-25 17:38:13 -0400 |
| commit | ae8e4ad63449212da28c6a169c36aac54ed38a9e (patch) | |
| tree | 830a4e3082d2eae5eaab9fa437bd83c10c1abd6f /docs | |
| parent | 3bea655f0147c9fc6ec948cbaf8ee7a5767eb045 (diff) | |
| download | pyramid-ae8e4ad63449212da28c6a169c36aac54ed38a9e.tar.gz pyramid-ae8e4ad63449212da28c6a169c36aac54ed38a9e.tar.bz2 pyramid-ae8e4ad63449212da28c6a169c36aac54ed38a9e.zip | |
convert bfgwiki tutorial to pyramid
Diffstat (limited to 'docs')
32 files changed, 184 insertions, 177 deletions
diff --git a/docs/tutorials/bfgwiki/authorization.rst b/docs/tutorials/bfgwiki/authorization.rst index d40dfe16f..48908a97b 100644 --- a/docs/tutorials/bfgwiki/authorization.rst +++ b/docs/tutorials/bfgwiki/authorization.rst @@ -7,17 +7,22 @@ view, edit, and add pages to our wiki. For purposes of demonstration we'll change our application to allow people whom are members of a *group* named ``group:editors`` to add and edit wiki pages but we'll continue allowing anyone with access to the server to view pages. -:mod:`repoze.bfg` provides facilities for *authorization* and +:mod:`pyramid` provides facilities for *authorization* and *authentication*. We'll make use of both features to provide security to our application. +The source code for this tutorial stage can be browsed via +`http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/authorization/ +<http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/authorization/>`_. + + The source code for this tutorial stage can be browsed at `docs.repoze.org <http://docs.repoze.org/bfgwiki-1.3/authorization>`_. -Configuring a ``repoze.bfg`` Authentication Policy +Configuring a ``pyramid`` Authentication Policy -------------------------------------------------- -For any :mod:`repoze.bfg` application to perform authorization, we +For any :mod:`pyramid` application to perform authorization, we need to add a ``security.py`` module and we'll need to change our :term:`application registry` to add an :term:`authentication policy` and a :term:`authorization policy`. @@ -29,7 +34,7 @@ We'll change our ``configure.zcml`` file to enable an ``AuthTktAuthenticationPolicy`` and an ``ACLAuthorizationPolicy`` to enable declarative security checking. We'll also add a new view stanza, which specifies a :term:`forbidden view`. This configures our -login view to show up when :mod:`repoze.bfg` detects that a view +login view to show up when :mod:`pyramid` detects that a view invocation can not be authorized. When you're done, your ``configure.zcml`` will look like so: @@ -97,7 +102,7 @@ into its template. We'll add something like this to each view body: .. code-block:: python :linenos: - from repoze.bfg.security import authenticated_userid + from pyramid.security import authenticated_userid logged_in = authenticated_userid(request) We'll then change the return value of each view that has an associated @@ -144,7 +149,7 @@ Giving Our Root Model Object an ACL ----------------------------------- We need to give our root model object an :term:`ACL`. This ACL will -be sufficient to provide enough information to the :mod:`repoze.bfg` +be sufficient to provide enough information to the :mod:`pyramid` security machinery to challenge a user who doesn't have appropriate credentials when he attempts to invoke the ``add_page`` or ``edit_page`` views. @@ -155,8 +160,8 @@ file: .. code-block:: python :linenos: - from repoze.bfg.security import Allow - from repoze.bfg.security import Everyone + from pyramid.security import Allow + from pyramid.security import Everyone Our root model is a ``Wiki`` object. We'll add the following line at class scope to our ``Wiki`` class: @@ -169,7 +174,7 @@ class scope to our ``Wiki`` class: It's only happenstance that we're assigning this ACL at class scope. An ACL can be attached to an object *instance* too; this is how "row -level security" can be achieved in :mod:`repoze.bfg` applications. We +level security" can be achieved in :mod:`pyramid` applications. We actually only need *one* ACL for the entire system, however, because our security requirements are simple, so this feature is not demonstrated. @@ -185,14 +190,14 @@ Adding ``permission`` Declarations to our ``bfg_view`` Decorators To protect each of our views with a particular permission, we need to pass a ``permission`` argument to each of our -:class:`repoze.bfg.view.bfg_view` decorators. To do so, within +:class:`pyramid.view.bfg_view` decorators. To do so, within ``views.py``: - We add ``permission='view'`` to the decorator attached to the ``view_wiki`` view function. This makes the assertion that only users who possess the effective ``view`` permission at the time of the request may invoke this view. We've granted - :data:`repoze.bfg.security.Everyone` the view permission at the root + :data:`pyramid.security.Everyone` the view permission at the root model via its ACL, so everyone will be able to invoke the ``view_wiki`` view. @@ -200,7 +205,7 @@ pass a ``permission`` argument to each of our ``view_page`` view function. This makes the assertion that only users who possess the effective ``view`` permission at the time of the request may invoke this view. We've granted - :data:`repoze.bfg.security.Everyone` the view permission at the root + :data:`pyramid.security.Everyone` the view permission at the root model via its ACL, so everyone will be able to invoke the ``view_page`` view. diff --git a/docs/tutorials/bfgwiki/background.rst b/docs/tutorials/bfgwiki/background.rst index 072e2cfa1..e81cf8192 100644 --- a/docs/tutorials/bfgwiki/background.rst +++ b/docs/tutorials/bfgwiki/background.rst @@ -2,8 +2,8 @@ Background ========== -This version of the :mod:`repoze.bfg` wiki tutorial presents a -:mod:`repoze.bfg` application that uses technologies which will be +This version of the :mod:`pyramid` wiki tutorial presents a +:mod:`pyramid` application that uses technologies which will be familiar to someone with :term:`Zope` experience. It uses :term:`ZODB` as a persistence mechanism and :term:`traversal` to map URLs to code. It can also be followed by people without any prior @@ -13,6 +13,6 @@ To code along with this tutorial, the developer will need a UNIX machine with development tools (Mac OS X with XCode, any Linux or BSD variant, etc) *or* he will need a Windows system of any kind. -This tutorial targets :mod:`repoze.bfg` version 1.3. +This tutorial targets :mod:`pyramid` version 1.3. Have fun! diff --git a/docs/tutorials/bfgwiki/basiclayout.rst b/docs/tutorials/bfgwiki/basiclayout.rst index bbfab7247..2649a345f 100644 --- a/docs/tutorials/bfgwiki/basiclayout.rst +++ b/docs/tutorials/bfgwiki/basiclayout.rst @@ -2,13 +2,14 @@ Basic Layout ============ -The starter files generated by the ``bfg_zodb`` template are basic, +The starter files generated by the ``pyramid_zodb`` template are basic, but they provide a good orientation for the high-level patterns common -to most :term:`traversal` -based :mod:`repoze.bfg` (and :term:`ZODB` +to most :term:`traversal` -based :mod:`pyramid` (and :term:`ZODB` based) projects. -The source code for this tutorial stage can be browsed at -`docs.repoze.org <http://docs.repoze.org/bfgwiki-1.3/basiclayout>`_. +The source code for this tutorial stage can be browsed via +`http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/basiclayout/ +<http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/basiclayout/>`_. ``__init__.py`` --------------- @@ -20,7 +21,7 @@ directory as a Python package. Configuration With ``configure.zcml`` -------------------------------------- -The ``bfg_zodb`` template uses :term:`ZCML` to perform system +The ``pyramid_zodb`` template uses :term:`ZCML` to perform system configuration. The ZCML file generated by the template looks like the following: @@ -28,14 +29,13 @@ following: :linenos: :language: xml -#. *Line 1*. The root ``<configure>`` element, in a ``bfg`` - namespace. +#. *Line 1*. The root ``<configure>`` element. #. *Line 4*. Boilerplate, the comment explains. #. *Lines 6-10*. Register a ``<view>`` that names a ``context`` type that is a class. ``.views.my_view`` is a *function* we write - (generated by the ``bfg_zodb`` template) that is given a + (generated by the ``pyramid_zodb`` template) that is given a ``context`` object and a ``request`` and which returns a dictionary. The ``renderer`` tag indicates that the ``templates/mytemplate.pt`` template should be used to turn the @@ -60,11 +60,11 @@ following: Content Models with ``models.py`` --------------------------------- -:mod:`repoze.bfg` often uses the word :term:`model` when talking about +:mod:`pyramid` often uses the word :term:`model` when talking about content resources arranged in the hierarchical *object graph* consulted by :term:`traversal`. The ``models.py`` file is where the -``bfg_zodb`` Paster template put the classes that implement our model -objects. +``pyramid_zodb`` Paster template put the classes that implement our +model objects. Here is the source for ``models.py``: @@ -83,7 +83,7 @@ Here is the source for ``models.py``: #. *Lines 6-12*. ``appmaker`` is used to return the *application root* object. It is called on *every request* to the - :mod:`repoze.bfg` application. It also performs bootstrapping by + :mod:`pyramid` application. It also performs bootstrapping by *creating* an application root (inside the ZODB root object) if one does not already exist. @@ -125,13 +125,13 @@ function within the file named ``run.py``: factory is named ``get_root``. #. *Lines 19-21*. Begin configuration using the ``begin`` method of - the :meth:`repoze.bfg.configuration.Configurator` class, load the + the :meth:`pyramid.configuration.Configurator` class, load the ``configure.zcml`` file from our package using the - :meth:`repoze.bfg.configuration.Configurator.load_zcml` method, and + :meth:`pyramid.configuration.Configurator.load_zcml` method, and end configuration using the - :meth:`repoze.bfg.configuration.Configurator.end` method. + :meth:`pyramid.configuration.Configurator.end` method. #. *Line 22*. Use the - :meth:`repoze.bfg.configuration.Configurator.make_wsgi_app` method + :meth:`pyramid.configuration.Configurator.make_wsgi_app` method to return a :term:`WSGI` application. diff --git a/docs/tutorials/bfgwiki/definingmodels.rst b/docs/tutorials/bfgwiki/definingmodels.rst index 1edb9c2c2..b63d0c21b 100644 --- a/docs/tutorials/bfgwiki/definingmodels.rst +++ b/docs/tutorials/bfgwiki/definingmodels.rst @@ -11,8 +11,9 @@ objects. A single instance of the "Wiki" class will serve as a container for "Page" objects, which will be instances of the "Page" class. -The source code for this tutorial stage can be browsed at -`docs.repoze.org <http://docs.repoze.org/bfgwiki-1.3/models>`_. +The source code for this tutorial stage can be browsed via +`http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/models/ +<http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/models/>`_. Deleting the Database --------------------- @@ -56,7 +57,7 @@ Our ``Wiki`` class should also have a ``__name__`` attribute set to ``None`` at class scope, and should have a ``__parent__`` attribute set to ``None`` at class scope as well. If a model has a ``__parent__`` attribute of ``None`` in a traversal-based -:mod:`repoze.bfg` application, it means that it's the :term:`root` +:mod:`pyramid` application, it means that it's the :term:`root` model. The ``__name__`` of the root model is also always ``None``. Then we'll add a ``Page`` class. This class should inherit from the @@ -102,10 +103,10 @@ separate test class for each model class, and we'll write a test class for the ``appmaker``. To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided -as a result of the ``bfg_zodb`` project generator. We'll add three -test classes: one for the ``Page`` model named ``PageModelTests``, one -for the ``Wiki`` model named ``WikiModelTests``, and one for the -appmaker named ``AppmakerTests``. +as a result of the ``pyramid_zodb`` project generator. We'll add +three test classes: one for the ``Page`` model named +``PageModelTests``, one for the ``Wiki`` model named +``WikiModelTests``, and one for the appmaker named ``AppmakerTests``. When we're done changing ``tests.py``, it will look something like so: diff --git a/docs/tutorials/bfgwiki/definingviews.rst b/docs/tutorials/bfgwiki/definingviews.rst index 6749606c1..f4d92371a 100644 --- a/docs/tutorials/bfgwiki/definingviews.rst +++ b/docs/tutorials/bfgwiki/definingviews.rst @@ -2,16 +2,16 @@ Defining Views ============== -A :term:`view callable` in a traversal-based :mod:`repoze.bfg` -applications is typically a simple Python function that accepts two +A :term:`view callable` in a traversal-based :mod:`pyramid` +application is typically a simple Python function that accepts two parameters: :term:`context`, and :term:`request`. A view callable is assumed to return a :term:`response` object. -.. note:: A :mod:`repoze.bfg` view can also be defined as callable +.. note:: A :mod:`pyramid` view can also be defined as callable which accepts *one* arguments: a :term:`request`. You'll see this - one-argument pattern used in other :mod:`repoze.bfg` tutorials and + one-argument pattern used in other :mod:`pyramid` tutorials and applications. Either calling convention will work in any - :mod:`repoze.bfg` application; the calling conventions can be used + :mod:`pyramid` application; the calling conventions can be used interchangeably as necessary. In :term:`traversal` based applications, such as this tutorial, the context is used frequently within the body of a view method, so it makes sense to use the @@ -22,11 +22,12 @@ assumed to return a :term:`response` object. to avoid the visual "noise". We're going to define several :term:`view callable` functions then -wire them into :mod:`repoze.bfg` using some :term:`view +wire them into :mod:`pyramid` using some :term:`view configuration` via :term:`ZCML`. -The source code for this tutorial stage can be browsed at -`docs.repoze.org <http://docs.repoze.org/bfgwiki-1.3/views>`_. +The source code for this tutorial stage can be browsed via +`http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/views/ +<http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki/src/views/>`_. Adding View Functions ===================== @@ -55,8 +56,8 @@ default view of a ``Wiki`` model object. It always redirects to the ``Page`` object named "FrontPage". It returns an instance of the :class:`webob.exc.HTTPFound` class (instances of which implement the WebOb :term:`response` interface), and the -:func:`repoze.bfg.url.model_url` API. -:func:`repoze.bfg.url.model_url` constructs a URL to the ``FrontPage`` +:func:`pyramid.url.model_url` API. +:func:`pyramid.url.model_url` constructs a URL to the ``FrontPage`` page (e.g. ``http://localhost:6543/FrontPage``), and uses it as the "location" of the HTTPFound response, forming an HTTP redirect. @@ -101,7 +102,7 @@ Note the contrast between this view callable and the ``view_wiki`` view callable. In the ``view_wiki`` view callable, we return a :term:`response` object. In the ``view_page`` view callable, we return a *dictionary*. It is *always* fine to return a -:term:`response` object from a :mod:`repoze.bfg` view. Returning a +:term:`response` object from a :mod:`pyramid` view. Returning a dictionary is allowed only when there is a :term:`renderer` associated with the view callable in the view configuration. @@ -115,7 +116,7 @@ this view. It also acts as a handler for the form that is generated when we want to add a page object. The ``context`` of the ``add_page`` view is always a Wiki object (*not* a Page object). -The request :term:`subpath` in :mod:`repoze.bfg` is the sequence of +The request :term:`subpath` in :mod:`pyramid` is the sequence of names that are found *after* the view name in the URL segments given in the ``PATH_INFO`` of the WSGI request as the result of :term:`traversal`. If our add view is invoked via, @@ -181,7 +182,7 @@ Adding Templates Most view callables we've added expected to be rendered via a :term:`template`. Each template is a :term:`Chameleon` template. The -default templating system in :mod:`repoze.bfg` is a variant of +default templating system in :mod:`pyramid` is a variant of :term:`ZPT` provided by Chameleon. These templates will live in the ``templates`` directory of our tutorial package. @@ -238,7 +239,7 @@ need to create this and place it in a file named ``style.css`` within our package's ``templates/static`` directory. This file is a little too long to replicate within the body of this guide, however it is available `online -<http://docs.repoze.org/bfgwiki-1.2/views/tutorial/templates/static/style.css>`_. +<http://github.com/Pylons/pyramid/blob/master/docs/tutorials/wiki/src/views/tutorial/templates/static/default.css>`_. This CSS file will be accessed via e.g. ``http://localhost:6543/static/style.css`` by virtue of the diff --git a/docs/tutorials/bfgwiki/distributing.rst b/docs/tutorials/bfgwiki/distributing.rst index 3ed84a892..81ec61a63 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 :mod:`repoze.bfg` environment. +package is a virtualenv representing a :mod:`pyramid` environment. On UNIX: diff --git a/docs/tutorials/bfgwiki/index.rst b/docs/tutorials/bfgwiki/index.rst index 2e5318e74..cb7eedf86 100644 --- a/docs/tutorials/bfgwiki/index.rst +++ b/docs/tutorials/bfgwiki/index.rst @@ -3,14 +3,15 @@ ZODB + Traversal Wiki Tutorial ============================== -This tutorial introduces a :term:`traversal` -based :mod:`repoze.bfg` +This tutorial introduces a :term:`traversal` -based :mod:`pyramid` application to a developer familiar with Python. When we're done with the tutorial, the developer will have created a basic Wiki application with authentication. For cut and paste purposes, the source code for all stages of this -tutorial can be browsed at `docs.repoze.org -<http://docs.repoze.org/bfgwiki-1.3>`_. +tutorial can be browsed at +`http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki +<http://github.com/Pylons/pyramid/tree/master/docs/tutorials/wiki>`_. .. toctree:: :maxdepth: 2 diff --git a/docs/tutorials/bfgwiki/installation.rst b/docs/tutorials/bfgwiki/installation.rst index 4425a4606..237abe7c3 100644 --- a/docs/tutorials/bfgwiki/installation.rst +++ b/docs/tutorials/bfgwiki/installation.rst @@ -52,16 +52,15 @@ Preparation, UNIX #. (Optional) Consider using ``source bin/activate`` to make your shell environment wired to use the virtualenv. -#. Use ``easy_install`` to get :mod:`repoze.bfg` and its direct +#. Use ``easy_install`` to get :mod:`pyramid` and its direct dependencies installed: .. code-block:: bash - $ bin/easy_install repoze.bfg + $ bin/easy_install pyramid #. Use ``easy_install`` to install ``docutils``, ``repoze.tm``, - ``repoze.zodbconn``, ``nose`` and ``coverage`` from - a different custom index (the "bfgsite" index). + ``repoze.zodbconn``, ``nose`` and ``coverage``: .. code-block:: bash @@ -105,16 +104,15 @@ Preparation, Windows #. (Optional) Consider using ``bin\activate.bat`` to make your shell environment wired to use the virtualenv. -#. Use ``easy_install`` to get :mod:`repoze.bfg` and its direct +#. Use ``easy_install`` to get :mod:`pyramid` and its direct dependencies installed: .. code-block:: bat - c:\bigfntut> Scripts\easy_install repoze.bfg + c:\bigfntut> Scripts\easy_install pyramid #. Use ``easy_install`` to install ``docutils``, ``repoze.tm``, - ``repoze.zodbconn``, ``nose`` and ``coverage`` from a *different* - index (the "bfgsite" index). + ``repoze.zodbconn``, ``nose`` and ``coverage``: .. code-block:: bat @@ -126,9 +124,9 @@ Preparation, Windows Making a Project ================ -Your next step is to create a project. :mod:`repoze.bfg` supplies a +Your next step is to create a project. :mod:`pyramid` supplies a variety of templates to generate sample projects. For this tutorial, -we will use the :term:`ZODB` -oriented template named ``bfg_zodb``. +we will use the :term:`ZODB` -oriented template named ``pyramid_zodb``. The below instructions assume your current working directory is the "virtualenv" named "bigfntut". @@ -137,15 +135,15 @@ On UNIX: .. code-block:: bash - $ bin/paster create -t bfg_zodb tutorial + $ bin/paster create -t pyramid_zodb tutorial On Windows: .. code-block:: bat - c:\bigfntut> Scripts\paster create -t bfg_zodb tutorial + c:\bigfntut> Scripts\paster create -t pyramid_zodb tutorial -.. note:: If you are using Windows, the ``bfg_zodb`` Paster template +.. note:: If you are using Windows, the ``pyramid_zodb`` Paster template doesn't currently deal gracefully with installation into a location that contains spaces in the path. If you experience startup problems, try putting both the virtualenv and the project into @@ -233,7 +231,7 @@ On Windows: c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \ --cover-erase --with-coverage -Looks like the code in the ``bfg_zodb`` template for ZODB projects is +Looks like the code in the ``pyramid_zodb`` template for ZODB projects is missing some test coverage, particularly in the file named ``models.py``. @@ -243,12 +241,12 @@ Visit the Application in a Browser In a browser, visit `http://localhost:6543/ <http://localhost:6543>`_. You will see the generated application's default page. -Decisions the ``bfg_zodb`` Template Has Made For You -===================================================== +Decisions the ``pyramid_zodb`` Template Has Made For You +======================================================== -Creating a project using the ``bfg_zodb`` template makes the +Creating a project using the ``pyramid_zodb`` template makes the assumption that you are willing to use :term:`ZODB` as persistent -storage and :term:`traversal` to map URLs to code. :mod:`repoze.bfg` +storage and :term:`traversal` to map URLs to code. :mod:`pyramid` supports any persistent storage mechanism (e.g. a SQL database or filesystem files, etc). It also supports an additional mechanism to map URLs to code (:term:`URL dispatch`). However, for the purposes of diff --git a/docs/tutorials/bfgwiki/src/authorization/setup.py b/docs/tutorials/bfgwiki/src/authorization/setup.py index 49679656d..bb2482cce 100644 --- a/docs/tutorials/bfgwiki/src/authorization/setup.py +++ b/docs/tutorials/bfgwiki/src/authorization/setup.py @@ -7,7 +7,7 @@ README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ - 'repoze.bfg', + 'pyramid', 'docutils', 'ZODB3', 'repoze.zodbconn', @@ -20,7 +20,7 @@ setup(name='tutorial', long_description=README + '\n\n' + CHANGES, classifiers=[ "Intended Audience :: Developers", - "Framework :: BFG", + "Framework :: Pylons", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -28,7 +28,7 @@ setup(name='tutorial', author='', author_email='', url='', - keywords='web wsgi bfg', + keywords='web wsgi pylons pyramid bfg', packages=find_packages(), include_package_data=True, zip_safe=False, diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml b/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml index 50b68ef35..e8603d7c4 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml @@ -1,14 +1,14 @@ -<configure xmlns="http://namespaces.repoze.org/bfg"> +<configure xmlns="http://pylonshq.com/pyramid"> <!-- this must be included for the view declarations to work --> - <include package="repoze.bfg.includes" /> + <include package="pyramid.includes" /> <scan package="."/> <view view=".login.login" renderer="templates/login.pt" - context="repoze.bfg.exceptions.Forbidden"/> + context="pyramid.exceptions.Forbidden"/> <authtktauthenticationpolicy secret="sosecret" diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/models.py b/docs/tutorials/bfgwiki/src/authorization/tutorial/models.py index dcffc28ac..0a31c38be 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/models.py +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/models.py @@ -7,7 +7,8 @@ from pyramid.security import Everyone class Wiki(PersistentMapping): __name__ = None __parent__ = None - __acl__ = [ (Allow, Everyone, 'view'), (Allow, 'group:editors', 'edit') ] + __acl__ = [ (Allow, Everyone, 'view'), + (Allow, 'group:editors', 'edit') ] class Page(Persistent): def __init__(self, data): diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/edit.pt b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/edit.pt index 12288d43d..5f8b22207 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/edit.pt +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/edit.pt @@ -6,7 +6,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> - <title>bfg tutorial wiki (based on TurboGears 20-Minute Wiki) + <title>Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki) Editing: ${page.__name__}</title> <link rel="stylesheet" type="text/css" href="${request.application_url}/static/style.css" /> diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/login.pt b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/login.pt index a9e086461..c56983d64 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/login.pt +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/login.pt @@ -6,7 +6,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> - <title>bfg tutorial wiki (based on TurboGears 20-Minute Wiki)</title> + <title>Pyramid 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/bfgwiki/src/authorization/tutorial/templates/mytemplate.pt b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/mytemplate.pt index 767252554..9178b5866 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/mytemplate.pt +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/mytemplate.pt @@ -5,13 +5,13 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>${project} Application</title> <meta name="keywords" content="python web application" /> -<meta name="description" content="repoze.bfg web application" /> +<meta name="description" content="pyramid web application" /> <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- start header --> <div id="logo"> - <h2><code>${project}</code>, a <code>repoze.bfg</code> application</h2> + <h2><code>${project}</code>, a <code>Pyramid</code> application</h2> </div> <div id="header"> <div id="menu"> @@ -26,7 +26,7 @@ <div class="post"> <h1 class="title">Welcome to <code>${project}</code>, an application generated by the <a - href="http://bfg.repoze.org">repoze.bfg</a> web + href="http://pylonshq.com/pyramid">Pyramid</a> web application framework.</h1> </div> </div> @@ -35,9 +35,9 @@ <div id="sidebar"> <ul> <li id="search"> - <h2>Search<br/> <code>repoze.bfg</code> Documentation</h2> + <h2>Search<br/> <code>Pyramid</code> Documentation</h2> <form method="get" - action="http://bfg.repoze.org/searchresults"> + action="http://pylonshq.com/docs/pyramid/current/searchresults"> <fieldset> <input type="text" id="q" name="text" value="" /> <input type="submit" id="x" value="Search" /> @@ -45,39 +45,39 @@ </form> </li> <li> - <h2><code>repoze.bfg</code> links</h2> + <h2><code>Pyramid</code> links</h2> <ul> <li><a - href="http://docs.repoze.org/bfg/#narrative-documentation">Narrative + href="http://pylonshq.com/docs/pyramid/current/#narrative-documentation">Narrative Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#api-documentation">API + href="http://pylonshq.com/docs/pyramid/current/#api-documentation">API Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#tutorials">Tutorials</a> + href="http://pylonshq.com/docs/pyramid/current/#tutorials">Tutorials</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#change-history">Change + href="http://pylonshq.com/docs/pyramid/current/#change-history">Change History</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#sample-applications">Sample + href="http://pylonshq.com/docs/pyramid/current/#sample-applications">Sample Applications</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#support-and-development">Support + href="http://pylonshq.com/docs/pyramid/current/#support-and-development">Support and Development</a> </li> <li> <a - href="irc://irc.freenode.net#repoze">IRC Channel</a> + href="irc://irc.freenode.net#pylons">IRC Channel</a> </li> </ul> </li> diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt index 65d362ae7..f957176f1 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt @@ -6,7 +6,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> - <title>${page.__name__} - bfg tutorial wiki + <title>${page.__name__} - Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki) </title> <link rel="stylesheet" type="text/css" diff --git a/docs/tutorials/bfgwiki/src/basiclayout/setup.py b/docs/tutorials/bfgwiki/src/basiclayout/setup.py index 35cf22893..f4a011c7e 100644 --- a/docs/tutorials/bfgwiki/src/basiclayout/setup.py +++ b/docs/tutorials/bfgwiki/src/basiclayout/setup.py @@ -7,7 +7,7 @@ README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ - 'repoze.bfg', + 'pyramid', 'docutils', 'ZODB3', 'repoze.zodbconn', @@ -20,7 +20,7 @@ setup(name='tutorial', long_description=README + '\n\n' + CHANGES, classifiers=[ "Intended Audience :: Developers", - "Framework :: BFG", + "Framework :: Pylons", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -28,7 +28,7 @@ setup(name='tutorial', author='', author_email='', url='', - keywords='web wsgi bfg', + keywords='web wsgi pylons pyramid bfg', packages=find_packages(), include_package_data=True, zip_safe=False, diff --git a/docs/tutorials/bfgwiki/src/basiclayout/tutorial/configure.zcml b/docs/tutorials/bfgwiki/src/basiclayout/tutorial/configure.zcml index 04e7d908d..4e83227bb 100644 --- a/docs/tutorials/bfgwiki/src/basiclayout/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki/src/basiclayout/tutorial/configure.zcml @@ -1,7 +1,7 @@ -<configure xmlns="http://namespaces.repoze.org/bfg"> +<configure xmlns="http://pylonshq.com/pyramid"> <!-- this must be included for the view declarations to work --> - <include package="repoze.bfg.includes" /> + <include package="pyramid.includes" /> <view context=".models.MyModel" diff --git a/docs/tutorials/bfgwiki/src/basiclayout/tutorial/templates/mytemplate.pt b/docs/tutorials/bfgwiki/src/basiclayout/tutorial/templates/mytemplate.pt index 767252554..9178b5866 100644 --- a/docs/tutorials/bfgwiki/src/basiclayout/tutorial/templates/mytemplate.pt +++ b/docs/tutorials/bfgwiki/src/basiclayout/tutorial/templates/mytemplate.pt @@ -5,13 +5,13 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>${project} Application</title> <meta name="keywords" content="python web application" /> -<meta name="description" content="repoze.bfg web application" /> +<meta name="description" content="pyramid web application" /> <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- start header --> <div id="logo"> - <h2><code>${project}</code>, a <code>repoze.bfg</code> application</h2> + <h2><code>${project}</code>, a <code>Pyramid</code> application</h2> </div> <div id="header"> <div id="menu"> @@ -26,7 +26,7 @@ <div class="post"> <h1 class="title">Welcome to <code>${project}</code>, an application generated by the <a - href="http://bfg.repoze.org">repoze.bfg</a> web + href="http://pylonshq.com/pyramid">Pyramid</a> web application framework.</h1> </div> </div> @@ -35,9 +35,9 @@ <div id="sidebar"> <ul> <li id="search"> - <h2>Search<br/> <code>repoze.bfg</code> Documentation</h2> + <h2>Search<br/> <code>Pyramid</code> Documentation</h2> <form method="get" - action="http://bfg.repoze.org/searchresults"> + action="http://pylonshq.com/docs/pyramid/current/searchresults"> <fieldset> <input type="text" id="q" name="text" value="" /> <input type="submit" id="x" value="Search" /> @@ -45,39 +45,39 @@ </form> </li> <li> - <h2><code>repoze.bfg</code> links</h2> + <h2><code>Pyramid</code> links</h2> <ul> <li><a - href="http://docs.repoze.org/bfg/#narrative-documentation">Narrative + href="http://pylonshq.com/docs/pyramid/current/#narrative-documentation">Narrative Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#api-documentation">API + href="http://pylonshq.com/docs/pyramid/current/#api-documentation">API Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#tutorials">Tutorials</a> + href="http://pylonshq.com/docs/pyramid/current/#tutorials">Tutorials</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#change-history">Change + href="http://pylonshq.com/docs/pyramid/current/#change-history">Change History</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#sample-applications">Sample + href="http://pylonshq.com/docs/pyramid/current/#sample-applications">Sample Applications</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#support-and-development">Support + href="http://pylonshq.com/docs/pyramid/current/#support-and-development">Support and Development</a> </li> <li> <a - href="irc://irc.freenode.net#repoze">IRC Channel</a> + href="irc://irc.freenode.net#pylons">IRC Channel</a> </li> </ul> </li> diff --git a/docs/tutorials/bfgwiki/src/models/setup.py b/docs/tutorials/bfgwiki/src/models/setup.py index 35cf22893..f4a011c7e 100644 --- a/docs/tutorials/bfgwiki/src/models/setup.py +++ b/docs/tutorials/bfgwiki/src/models/setup.py @@ -7,7 +7,7 @@ README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ - 'repoze.bfg', + 'pyramid', 'docutils', 'ZODB3', 'repoze.zodbconn', @@ -20,7 +20,7 @@ setup(name='tutorial', long_description=README + '\n\n' + CHANGES, classifiers=[ "Intended Audience :: Developers", - "Framework :: BFG", + "Framework :: Pylons", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -28,7 +28,7 @@ setup(name='tutorial', author='', author_email='', url='', - keywords='web wsgi bfg', + keywords='web wsgi pylons pyramid bfg', packages=find_packages(), include_package_data=True, zip_safe=False, diff --git a/docs/tutorials/bfgwiki/src/models/tutorial/configure.zcml b/docs/tutorials/bfgwiki/src/models/tutorial/configure.zcml index 149eff13d..6db3bd158 100644 --- a/docs/tutorials/bfgwiki/src/models/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki/src/models/tutorial/configure.zcml @@ -1,7 +1,7 @@ -<configure xmlns="http://namespaces.repoze.org/bfg"> +<configure xmlns="http://pylonshq.com/pyramid"> <!-- this must be included for the view declarations to work --> - <include package="repoze.bfg.includes" /> + <include package="pyramid.includes" /> <view context=".models.Wiki" diff --git a/docs/tutorials/bfgwiki/src/models/tutorial/templates/mytemplate.pt b/docs/tutorials/bfgwiki/src/models/tutorial/templates/mytemplate.pt index 767252554..9178b5866 100644 --- a/docs/tutorials/bfgwiki/src/models/tutorial/templates/mytemplate.pt +++ b/docs/tutorials/bfgwiki/src/models/tutorial/templates/mytemplate.pt @@ -5,13 +5,13 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>${project} Application</title> <meta name="keywords" content="python web application" /> -<meta name="description" content="repoze.bfg web application" /> +<meta name="description" content="pyramid web application" /> <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- start header --> <div id="logo"> - <h2><code>${project}</code>, a <code>repoze.bfg</code> application</h2> + <h2><code>${project}</code>, a <code>Pyramid</code> application</h2> </div> <div id="header"> <div id="menu"> @@ -26,7 +26,7 @@ <div class="post"> <h1 class="title">Welcome to <code>${project}</code>, an application generated by the <a - href="http://bfg.repoze.org">repoze.bfg</a> web + href="http://pylonshq.com/pyramid">Pyramid</a> web application framework.</h1> </div> </div> @@ -35,9 +35,9 @@ <div id="sidebar"> <ul> <li id="search"> - <h2>Search<br/> <code>repoze.bfg</code> Documentation</h2> + <h2>Search<br/> <code>Pyramid</code> Documentation</h2> <form method="get" - action="http://bfg.repoze.org/searchresults"> + action="http://pylonshq.com/docs/pyramid/current/searchresults"> <fieldset> <input type="text" id="q" name="text" value="" /> <input type="submit" id="x" value="Search" /> @@ -45,39 +45,39 @@ </form> </li> <li> - <h2><code>repoze.bfg</code> links</h2> + <h2><code>Pyramid</code> links</h2> <ul> <li><a - href="http://docs.repoze.org/bfg/#narrative-documentation">Narrative + href="http://pylonshq.com/docs/pyramid/current/#narrative-documentation">Narrative Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#api-documentation">API + href="http://pylonshq.com/docs/pyramid/current/#api-documentation">API Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#tutorials">Tutorials</a> + href="http://pylonshq.com/docs/pyramid/current/#tutorials">Tutorials</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#change-history">Change + href="http://pylonshq.com/docs/pyramid/current/#change-history">Change History</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#sample-applications">Sample + href="http://pylonshq.com/docs/pyramid/current/#sample-applications">Sample Applications</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#support-and-development">Support + href="http://pylonshq.com/docs/pyramid/current/#support-and-development">Support and Development</a> </li> <li> <a - href="irc://irc.freenode.net#repoze">IRC Channel</a> + href="irc://irc.freenode.net#pylons">IRC Channel</a> </li> </ul> </li> diff --git a/docs/tutorials/bfgwiki/src/viewdecorators/setup.py b/docs/tutorials/bfgwiki/src/viewdecorators/setup.py index 35cf22893..977990a29 100644 --- a/docs/tutorials/bfgwiki/src/viewdecorators/setup.py +++ b/docs/tutorials/bfgwiki/src/viewdecorators/setup.py @@ -7,7 +7,7 @@ README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ - 'repoze.bfg', + 'pyramid', 'docutils', 'ZODB3', 'repoze.zodbconn', @@ -20,7 +20,7 @@ setup(name='tutorial', long_description=README + '\n\n' + CHANGES, classifiers=[ "Intended Audience :: Developers", - "Framework :: BFG", + "Framework :: Pylons", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -28,7 +28,7 @@ setup(name='tutorial', author='', author_email='', url='', - keywords='web wsgi bfg', + keywords='web wsgi bfg pylons pyramid', packages=find_packages(), include_package_data=True, zip_safe=False, diff --git a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/configure.zcml b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/configure.zcml index 2bb0fef96..220160f73 100644 --- a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/configure.zcml @@ -1,7 +1,7 @@ -<configure xmlns="http://namespaces.repoze.org/bfg"> +<configure xmlns="http://pylonshq.com/pyramid"> <!-- this must be included for the view declarations to work --> - <include package="repoze.bfg.includes" /> + <include package="pyramid.includes" /> <scan package="."/> diff --git a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/edit.pt b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/edit.pt index 883ac8b52..525bd43df 100644 --- a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/edit.pt +++ b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/edit.pt @@ -6,7 +6,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> - <title>bfg tutorial wiki (based on TurboGears 20-Minute Wiki) Editing: ${page.__name__}</title> + <title>Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki) Editing: ${page.__name__}</title> <link rel="stylesheet" type="text/css" href="${request.application_url}/static/style.css" /> </head> diff --git a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/mytemplate.pt b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/mytemplate.pt index 767252554..9178b5866 100644 --- a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/mytemplate.pt +++ b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/mytemplate.pt @@ -5,13 +5,13 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>${project} Application</title> <meta name="keywords" content="python web application" /> -<meta name="description" content="repoze.bfg web application" /> +<meta name="description" content="pyramid web application" /> <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- start header --> <div id="logo"> - <h2><code>${project}</code>, a <code>repoze.bfg</code> application</h2> + <h2><code>${project}</code>, a <code>Pyramid</code> application</h2> </div> <div id="header"> <div id="menu"> @@ -26,7 +26,7 @@ <div class="post"> <h1 class="title">Welcome to <code>${project}</code>, an application generated by the <a - href="http://bfg.repoze.org">repoze.bfg</a> web + href="http://pylonshq.com/pyramid">Pyramid</a> web application framework.</h1> </div> </div> @@ -35,9 +35,9 @@ <div id="sidebar"> <ul> <li id="search"> - <h2>Search<br/> <code>repoze.bfg</code> Documentation</h2> + <h2>Search<br/> <code>Pyramid</code> Documentation</h2> <form method="get" - action="http://bfg.repoze.org/searchresults"> + action="http://pylonshq.com/docs/pyramid/current/searchresults"> <fieldset> <input type="text" id="q" name="text" value="" /> <input type="submit" id="x" value="Search" /> @@ -45,39 +45,39 @@ </form> </li> <li> - <h2><code>repoze.bfg</code> links</h2> + <h2><code>Pyramid</code> links</h2> <ul> <li><a - href="http://docs.repoze.org/bfg/#narrative-documentation">Narrative + href="http://pylonshq.com/docs/pyramid/current/#narrative-documentation">Narrative Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#api-documentation">API + href="http://pylonshq.com/docs/pyramid/current/#api-documentation">API Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#tutorials">Tutorials</a> + href="http://pylonshq.com/docs/pyramid/current/#tutorials">Tutorials</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#change-history">Change + href="http://pylonshq.com/docs/pyramid/current/#change-history">Change History</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#sample-applications">Sample + href="http://pylonshq.com/docs/pyramid/current/#sample-applications">Sample Applications</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#support-and-development">Support + href="http://pylonshq.com/docs/pyramid/current/#support-and-development">Support and Development</a> </li> <li> <a - href="irc://irc.freenode.net#repoze">IRC Channel</a> + href="irc://irc.freenode.net#pylons">IRC Channel</a> </li> </ul> </li> diff --git a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/view.pt b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/view.pt index 5326e6454..0fc68aa2f 100644 --- a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/view.pt +++ b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/view.pt @@ -6,7 +6,7 @@ <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__} - Pyramid 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/bfgwiki/src/views/setup.py b/docs/tutorials/bfgwiki/src/views/setup.py index 35cf22893..f4a011c7e 100644 --- a/docs/tutorials/bfgwiki/src/views/setup.py +++ b/docs/tutorials/bfgwiki/src/views/setup.py @@ -7,7 +7,7 @@ README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ - 'repoze.bfg', + 'pyramid', 'docutils', 'ZODB3', 'repoze.zodbconn', @@ -20,7 +20,7 @@ setup(name='tutorial', long_description=README + '\n\n' + CHANGES, classifiers=[ "Intended Audience :: Developers", - "Framework :: BFG", + "Framework :: Pylons", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -28,7 +28,7 @@ setup(name='tutorial', author='', author_email='', url='', - keywords='web wsgi bfg', + keywords='web wsgi pylons pyramid bfg', packages=find_packages(), include_package_data=True, zip_safe=False, diff --git a/docs/tutorials/bfgwiki/src/views/tutorial/configure.zcml b/docs/tutorials/bfgwiki/src/views/tutorial/configure.zcml index d265d63e4..27bbd8cb1 100644 --- a/docs/tutorials/bfgwiki/src/views/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki/src/views/tutorial/configure.zcml @@ -1,7 +1,7 @@ -<configure xmlns="http://namespaces.repoze.org/bfg"> +<configure xmlns="http://pylonshq.com/pyramid"> <!-- this must be included for the view declarations to work --> - <include package="repoze.bfg.includes" /> + <include package="pyramid.includes" /> <static name="static" diff --git a/docs/tutorials/bfgwiki/src/views/tutorial/templates/edit.pt b/docs/tutorials/bfgwiki/src/views/tutorial/templates/edit.pt index d94bc503b..1d40f526d 100644 --- a/docs/tutorials/bfgwiki/src/views/tutorial/templates/edit.pt +++ b/docs/tutorials/bfgwiki/src/views/tutorial/templates/edit.pt @@ -6,7 +6,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> - <title>bfg tutorial wiki (based on TurboGears 20-Minute Wiki) + <title>Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki) Editing: ${page.__name__}</title> <link rel="stylesheet" type="text/css" href="${request.application_url}/static/style.css" /> diff --git a/docs/tutorials/bfgwiki/src/views/tutorial/templates/mytemplate.pt b/docs/tutorials/bfgwiki/src/views/tutorial/templates/mytemplate.pt index 767252554..9178b5866 100644 --- a/docs/tutorials/bfgwiki/src/views/tutorial/templates/mytemplate.pt +++ b/docs/tutorials/bfgwiki/src/views/tutorial/templates/mytemplate.pt @@ -5,13 +5,13 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>${project} Application</title> <meta name="keywords" content="python web application" /> -<meta name="description" content="repoze.bfg web application" /> +<meta name="description" content="pyramid web application" /> <link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- start header --> <div id="logo"> - <h2><code>${project}</code>, a <code>repoze.bfg</code> application</h2> + <h2><code>${project}</code>, a <code>Pyramid</code> application</h2> </div> <div id="header"> <div id="menu"> @@ -26,7 +26,7 @@ <div class="post"> <h1 class="title">Welcome to <code>${project}</code>, an application generated by the <a - href="http://bfg.repoze.org">repoze.bfg</a> web + href="http://pylonshq.com/pyramid">Pyramid</a> web application framework.</h1> </div> </div> @@ -35,9 +35,9 @@ <div id="sidebar"> <ul> <li id="search"> - <h2>Search<br/> <code>repoze.bfg</code> Documentation</h2> + <h2>Search<br/> <code>Pyramid</code> Documentation</h2> <form method="get" - action="http://bfg.repoze.org/searchresults"> + action="http://pylonshq.com/docs/pyramid/current/searchresults"> <fieldset> <input type="text" id="q" name="text" value="" /> <input type="submit" id="x" value="Search" /> @@ -45,39 +45,39 @@ </form> </li> <li> - <h2><code>repoze.bfg</code> links</h2> + <h2><code>Pyramid</code> links</h2> <ul> <li><a - href="http://docs.repoze.org/bfg/#narrative-documentation">Narrative + href="http://pylonshq.com/docs/pyramid/current/#narrative-documentation">Narrative Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#api-documentation">API + href="http://pylonshq.com/docs/pyramid/current/#api-documentation">API Documentation</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#tutorials">Tutorials</a> + href="http://pylonshq.com/docs/pyramid/current/#tutorials">Tutorials</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#change-history">Change + href="http://pylonshq.com/docs/pyramid/current/#change-history">Change History</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#sample-applications">Sample + href="http://pylonshq.com/docs/pyramid/current/#sample-applications">Sample Applications</a> </li> <li> <a - href="http://docs.repoze.org/bfg/#support-and-development">Support + href="http://pylonshq.com/docs/pyramid/current/#support-and-development">Support and Development</a> </li> <li> <a - href="irc://irc.freenode.net#repoze">IRC Channel</a> + href="irc://irc.freenode.net#pylons">IRC Channel</a> </li> </ul> </li> diff --git a/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt b/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt index 5b9a3da31..50719f9e9 100644 --- a/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt +++ b/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt @@ -6,7 +6,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> - <title>${page.__name__} - bfg tutorial wiki + <title>${page.__name__} - Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki) </title> <link rel="stylesheet" type="text/css" diff --git a/docs/tutorials/bfgwiki/viewdecorators.rst b/docs/tutorials/bfgwiki/viewdecorators.rst index 3360adc1a..7d202ee6d 100644 --- a/docs/tutorials/bfgwiki/viewdecorators.rst +++ b/docs/tutorials/bfgwiki/viewdecorators.rst @@ -16,12 +16,12 @@ to using view decorators. Adding View Decorators ====================== -We're going to import the :class:`repoze.bfg.view.bfg_view` callable. +We're going to import the :class:`pyramid.view.bfg_view` callable. This callable can be used as a function, class, or method decorator. We'll use it to decorate our ``view_wiki``, ``view_page``, ``add_page`` and ``edit_page`` view functions. -The :class:`repoze.bfg.view.bfg_view` callable accepts a number of +The :class:`pyramid.view.bfg_view` callable accepts a number of arguments: ``context`` @@ -153,9 +153,9 @@ Adding a Scan Directive In order for our decorators to be recognized, we must add a bit of boilerplate to our ``configure.zcml`` file which tells -:mod:`repoze.bfg` to kick off a :term:`scan` at startup time. Add the +:mod:`pyramid` to kick off a :term:`scan` at startup time. Add the following tag anywhere beneath the ``<include -package="repoze.bfg.includes">`` tag but before the ending +package="pyramid.includes">`` tag but before the ending ``</configure>`` tag within ``configure.zcml``: .. code-block:: xml |
