summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/bfg/index.rst4
-rw-r--r--docs/tutorials/cmf/actions.rst28
-rw-r--r--docs/tutorials/cmf/catalog.rst73
-rw-r--r--docs/tutorials/cmf/content.rst67
-rw-r--r--docs/tutorials/cmf/index.rst38
-rw-r--r--docs/tutorials/cmf/missing.rst22
-rw-r--r--docs/tutorials/cmf/skins.rst23
-rw-r--r--docs/tutorials/cmf/workflow.rst14
-rw-r--r--docs/tutorials/modwsgi/index.rst12
-rw-r--r--docs/tutorials/wiki/authorization.rst9
-rw-r--r--docs/tutorials/wiki/basiclayout.rst1
-rw-r--r--docs/tutorials/wiki/definingmodels.rst2
-rw-r--r--docs/tutorials/wiki/definingviews.rst22
-rw-r--r--docs/tutorials/wiki/distributing.rst2
-rw-r--r--docs/tutorials/wiki/installation.rst74
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/style.css109
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt85
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt79
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt108
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt89
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/views.py2
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt48
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/tests.py6
-rw-r--r--docs/tutorials/wiki/src/basiclayout/tutorial/views.py3
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt108
-rw-r--r--docs/tutorials/wiki/src/models/tutorial/tests.py6
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/style.css109
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/templates/edit.pt79
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt108
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/templates/view.pt83
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/views.py2
-rw-r--r--docs/tutorials/wiki2/authorization.rst361
-rw-r--r--docs/tutorials/wiki2/definingviews.rst29
-rw-r--r--docs/tutorials/wiki2/distributing.rst2
-rw-r--r--docs/tutorials/wiki2/installation.rst32
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/style.css109
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt86
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt79
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt48
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt85
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/tests.py22
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/models.py3
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt48
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py6
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/models.py3
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt48
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/tests.py6
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/__init__.py2
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/ie6.css8
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/pylons.css50
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/pyramid-small.pngbin0 -> 7044 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/style.css109
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt79
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt48
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/templates/view.pt78
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/tests.py20
125 files changed, 1550 insertions, 1632 deletions
diff --git a/docs/tutorials/bfg/index.rst b/docs/tutorials/bfg/index.rst
index 3c0b3bf01..9f9a5238c 100644
--- a/docs/tutorials/bfg/index.rst
+++ b/docs/tutorials/bfg/index.rst
@@ -176,6 +176,10 @@ Here's how to convert a :mod:`repoze.bfg` application to a
<bfg:failingtag attr="foo"/>
</configure>
+ You will also need to add the ``pyramid_zcml`` package to your
+ ``setup.py`` ``install_requires`` list. In Pyramid, ZCML configuration
+ became an optional add-on supported by the ``pyramid_zcml`` package.
+
#. Retest your application using :app:`Pyramid`. This might be as
easy as:
diff --git a/docs/tutorials/cmf/actions.rst b/docs/tutorials/cmf/actions.rst
deleted file mode 100644
index a6e33fa59..000000000
--- a/docs/tutorials/cmf/actions.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. _actions_chapter:
-
-=======
-Actions
-=======
-
-In CMF, the "actions tool" along with "action providers" create an extensible
-mechanism to show links in the CMF management UI that invoke a particular
-behavior or which show a particular template.
-
-:app:`Pyramid` itself has no such concept, and no package provides a direct
-replacement. Actions are such a generic concept that it's simple to
-reimplement action-like navigation in a different way within any given
-application. For example, a module-scope global dictionary which has keys
-that are action names, and values which are tuples of (permission, link).
-Take that concept and expand on it, and you'll have some passable actions
-tool replacement within a single application.
-
-The `pyramid_viewgroup <https://github.com/Pylons/pyramid_viewgroup/>`_
-package provides some functionality for creating "view groups". Each view in
-a viewgroup can provide some snippet of HTML (e.g. a single "tab"), and
-individual views (tabs) within the group which cannot be displayed to the
-user due to the user's lack of permissions will be omitted from the rendered
-output.
-
-The :term:`repoze.lemonade` package provides "list item" support that
-may be used to construct action lists.
-
diff --git a/docs/tutorials/cmf/catalog.rst b/docs/tutorials/cmf/catalog.rst
deleted file mode 100644
index d5e9534ae..000000000
--- a/docs/tutorials/cmf/catalog.rst
+++ /dev/null
@@ -1,73 +0,0 @@
-.. _catalog_chapter:
-
-=======
-Catalog
-=======
-
-The main feature of the CMF catalog is that it filters search results
-from the Zope 2 "catalog" based on the requesting user's ability to
-view a particular cataloged object.
-
-:app:`Pyramid` itself has no cataloging facility, but an addon
-package named :term:`repoze.catalog` offers similar functionality.
-
-Creating an Allowed Index
--------------------------
-
-In CMF, a catalog index named ``getAllowedRolesAndUsers`` along with
-application indexing code allows for filtered search results. It's
-reasonably easy to reproduce this pattern using some custom code.
-
-Creating The ``allowed`` Index
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Here's some code which creates an ``allowed`` index for use in a
-``repoze.catalog`` catalog::
-
- from pyramid.security import principals_allowed_by_permission
- from repoze.catalog.indexes.keyword import CatalogKeywordIndex
- from repoze.catalog.catalog import Catalog
-
- class Allowed:
- def __init__(self, permission):
- self.permission = permission
-
- def __call__(self, context, default):
- principals = principals_allowed_by_permission(context,
- self.permission)
- return principals
-
- def make_allowed_index(permission='View'):
- index = CatalogKeywordIndex(Allowed(permission))
- return index
-
- index = make_allowed_index()
- catalog = Catalog()
- catalog['allowed'] = index
-
-When you index an item, the allowed index will be populated with all
-the principal ids which have the 'View' permission.
-
-Using the ``allowed`` Index
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Here's how you might use the ``allowed`` index within a query::
-
- from pyramid.security import effective_principals
- principals = effective_principals(request)
- catalog.searchResults(allowed={'operator':'or', 'query':principals})
-
-The above query will return all document ids that the current user has
-the 'View' permission against. Add other indexes to the query to get
-a useful result.
-
-See the `repoze.catalog package
-<http://svn.repoze.org/repoze.catalog/trunk>`_ for more information.
-
-
-
-
-
-
-
-
diff --git a/docs/tutorials/cmf/content.rst b/docs/tutorials/cmf/content.rst
deleted file mode 100644
index 85e5b5fbc..000000000
--- a/docs/tutorials/cmf/content.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-.. _content_types_chapter:
-
-=============
-Content Types
-=============
-
-In CMF, a content type is defined as a bag of settings (the type
-information, controlled within the "types tool"), as well as factory
-code which generates an instance of that content. It is possible to
-construct and enumerate content types using APIs defined on the types
-tool.
-
-:app:`Pyramid` itself has no such concept, but an addon package named
-:term:`repoze.lemonade` has a barebones replacement.
-
-Factory Type Information
-------------------------
-
-A factory type information object in CMF allows you to associate a
-title, a description, an internationalization domain, an icon, an
-initial view name, a factory, and a number of security settings with a
-type name. Each type information object knows how to manufacture
-content objects that match its type.
-
-:app:`Pyramid` certainly enforces none of these concepts in any
-particular way, but :term:`repoze.lemonade` does.
-
-``repoze.lemonade`` Content
-+++++++++++++++++++++++++++
-
-:term:`repoze.lemonade` provides a reasonably handy directive and set
-of helper functions which allow you to:
-
-#. Associate a interface with a factory function, making it into a
- "content type".
-
-#. Enumerate all interfaces associated with factory functions.
-
-.. note:: Using this pattern is often plain silly, as it's usually
- just as easy to actually import a class implementation and
- create an instance directly using its constructor. But it
- can be useful in cases where you want to address some set of
- constructors uniformly without doing direct imports in the
- code which performs the construction, or if you need to make
- content construction uniform across a diverse set of model
- types, or if you need to enumerate some set of information
- about "content" types. It's left as an exercise to the
- reader to determine under which circumstances using this
- pattern is an appropriate thing to do. Hint: not very
- often, unless you're doing the indirection solely to aid
- content-agnostic unit tests or if you need to get an
- enumerated subset of content type information to aid in UI
- generation. That said, this *is* a tutorial about how to
- get CMF-like features in :app:`Pyramid`, so we'll assume
- the pattern is useful to readers.
-
-See the `repoze.lemonade package
-<http://svn.repoze.org/repoze.lemonade/trunk>`_ for more information,
-particularly its documentation for "content".
-
-
-
-
-
-
-
-
diff --git a/docs/tutorials/cmf/index.rst b/docs/tutorials/cmf/index.rst
deleted file mode 100644
index 26aa336a9..000000000
--- a/docs/tutorials/cmf/index.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-Converting an Existing Zope/CMF Application to :app:`Pyramid`
-================================================================
-
-The Zope `Content Management Framework
-<http://www.zope.org/Products/CMF/>`_ (aka CMF) is a layer on top of
-:term:`Zope` 2 that provides facilities for creating content-driven
-websites. It's reasonably easy to convert a modern Zope/CMF
-application to :app:`Pyramid`.
-
-The main difference between CMF and :app:`Pyramid` is that :app:`Pyramid`
-does not advertise itself as a system into which you can plug arbitrary
-"packages" that extend a system-supplied management user interface. You
-*could* build a CMF-like layer on top of :app:`Pyramid` but none currently
-exists. For those sorts of high-extensibility, highly-regularized-UI
-systems, CMF is still the better choice.
-
-:app:`Pyramid` (and other more lightweight systems) is often a
-better choice when you're building the a user interface from scratch,
-which often happens when the paradigms of some CMF-provided user
-interface don't match the requirements of an application very closely.
-Even so, a good number of developers tend to use CMF even when they do
-start an application for which they need to build a UI from scratch,
-because CMF happens to provide other helpful services, such as types,
-skins, and workflow; this tutorial is for those sorts of developers
-and projects.
-
-.. toctree::
- :maxdepth: 2
-
- content.rst
- catalog.rst
- skins.rst
- actions.rst
- workflow.rst
- missing.rst
-
-
-
diff --git a/docs/tutorials/cmf/missing.rst b/docs/tutorials/cmf/missing.rst
deleted file mode 100644
index 964e0ab04..000000000
--- a/docs/tutorials/cmf/missing.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-Missing Comparisons
-===================
-
-We currently don't have any comparative Pyramid-vs-CMF information
-about the following concepts within this tutorial:
-
-- Templates
-
-- Forms
-
-- Membership
-
-- Discussions
-
-- Syndication
-
-- Dublincore
-
-Please ask on the `Pylons-devel maillist
-<http://groups.google.com/group/pylons-devel>`_ or on the `#pylons IRC
-channel <http://irc.freenode.net#pylons>`_ about these topics.
-
diff --git a/docs/tutorials/cmf/skins.rst b/docs/tutorials/cmf/skins.rst
deleted file mode 100644
index 676a076b3..000000000
--- a/docs/tutorials/cmf/skins.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-.. _skins_chapter:
-
-=====
-Skins
-=====
-
-In CMF, a "skin layer" is defined as a collection of templates and
-code (Python scripts, DTML methods, etc) that can be activated and
-deactivated within a particular setup. A collection of active "skin
-layers" grouped in a particular order forms a "skin". "Add-on" CMF
-products often provide skin layers that are activated within a
-particular skin to provide the site with additional features.
-
-To override static resources using a "search path" much like a set of
-skin layers, :app:`Pyramid` provides the concept of
-:term:`resource` overrides. See :ref:`overriding_resources_section`
-for more information about resource overrides.
-
-While there is no analogue to a skin layer search path for locating
-Python code (as opposed to resources), :term:`view` code combined with
-differing :term:`predicate` arguments can provide a good deal of
-the same sort of behavior.
-
diff --git a/docs/tutorials/cmf/workflow.rst b/docs/tutorials/cmf/workflow.rst
deleted file mode 100644
index cc70d771a..000000000
--- a/docs/tutorials/cmf/workflow.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-.. _workflow_chapter:
-
-========
-Workflow
-========
-
-In CMF, the "workflow tool" allows developers to design state machines
-which imply transition between content states.
-
-:app:`Pyramid` itself has no such concept, but the
-:term:`repoze.workflow` package provides a simple state machine
-implementation that can act as a barebones workflow tool. See its
-documentation for more information.
-
diff --git a/docs/tutorials/modwsgi/index.rst b/docs/tutorials/modwsgi/index.rst
index 766f05b56..4257f40b3 100644
--- a/docs/tutorials/modwsgi/index.rst
+++ b/docs/tutorials/modwsgi/index.rst
@@ -14,12 +14,12 @@ This particular tutorial was developed under Apple's Mac OS X platform
largely the same for all systems, delta specific path information for
commands and files.
-.. note:: Unfortunately these instructions almost certainly won't work
- for deploying a :app:`Pyramid` application on a Windows system
- using ``mod_wsgi``. If you have experience with :app:`Pyramid`
- and ``mod_wsgi`` on Windows systems, please help us document
- this experience by submitting documentation to the `mailing list
- <http://lists.repoze.org/listinfo/repoze-dev>`_.
+.. note:: Unfortunately these instructions almost certainly won't work for
+ deploying a :app:`Pyramid` application on a Windows system using
+ ``mod_wsgi``. If you have experience with :app:`Pyramid` and ``mod_wsgi``
+ on Windows systems, please help us document this experience by submitting
+ documentation to the `Pylons-devel maillist
+ <http://groups.google.com/group/pylons-devel>`_.
#. The tutorial assumes you have Apache already installed on your
system. If you do not, install Apache 2.X for your platform in
diff --git a/docs/tutorials/wiki/authorization.rst b/docs/tutorials/wiki/authorization.rst
index 1b66ace96..5e45c070e 100644
--- a/docs/tutorials/wiki/authorization.rst
+++ b/docs/tutorials/wiki/authorization.rst
@@ -136,8 +136,8 @@ Add a ``login.pt`` template to your templates directory. It's
referred to within the login view we just added to ``login.py``.
.. literalinclude:: src/authorization/tutorial/templates/login.pt
- :linenos:
:language: xml
+ :tab-width: 2
Change ``view.pt`` and ``edit.pt``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -146,11 +146,10 @@ We'll also need to change our ``edit.pt`` and ``view.pt`` templates to
display a "Logout" link if someone is logged in. This link will
invoke the logout view.
-To do so we'll add this to both templates within the ``<div
-class="main_content">`` div:
+To do so we'll add this to both templates within the ``<div id="right"
+class="app-welcome align-right">`` div:
.. code-block:: xml
- :linenos:
<span tal:condition="logged_in">
<a href="${request.application_url}/logout">Logout</a>
@@ -283,12 +282,14 @@ Our ``edit.pt`` template will look something like this when we're done:
.. literalinclude:: src/authorization/tutorial/templates/edit.pt
:linenos:
:language: xml
+ :tab-width: 2
Our ``view.pt`` template will look something like this when we're done:
.. literalinclude:: src/authorization/tutorial/templates/view.pt
:linenos:
:language: xml
+ :tab-width: 2
Revisiting the Application
---------------------------
diff --git a/docs/tutorials/wiki/basiclayout.rst b/docs/tutorials/wiki/basiclayout.rst
index f6e1f800a..4017d7af8 100644
--- a/docs/tutorials/wiki/basiclayout.rst
+++ b/docs/tutorials/wiki/basiclayout.rst
@@ -169,7 +169,6 @@ The ``development.ini`` (in the tutorial :term:`project` directory, as
opposed to the tutorial :term:`package` directory) looks like this:
.. literalinclude:: src/views/development.ini
- :linenos:
:language: ini
diff --git a/docs/tutorials/wiki/definingmodels.rst b/docs/tutorials/wiki/definingmodels.rst
index f201f6dc7..5e4b8fb22 100644
--- a/docs/tutorials/wiki/definingmodels.rst
+++ b/docs/tutorials/wiki/definingmodels.rst
@@ -163,7 +163,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\python setup.py test -q
+ c:\pyramidtut\tutorial> ..\Scripts\python setup.py test -q
The expected output is something like this:
diff --git a/docs/tutorials/wiki/definingviews.rst b/docs/tutorials/wiki/definingviews.rst
index 5b0e5dca1..7ad5e57cb 100644
--- a/docs/tutorials/wiki/definingviews.rst
+++ b/docs/tutorials/wiki/definingviews.rst
@@ -230,8 +230,8 @@ Once we're done with the ``view.pt`` template, it will look a lot like
the below:
.. literalinclude:: src/views/tutorial/templates/view.pt
- :linenos:
:language: xml
+ :tab-width: 2
.. note:: The names available for our use in a template are always those that
are present in the dictionary returned by the view callable. But our
@@ -257,23 +257,25 @@ Once we're done with the ``edit.pt`` template, it will look a lot like the
below:
.. literalinclude:: src/views/tutorial/templates/edit.pt
- :linenos:
:language: xml
+ :tab-width: 2
Static Assets
-------------
-Our templates name a single static asset named ``style.css``. We need to
-create this and place it in a file named ``style.css`` within our package's
-``static`` directory. This file is a little too long to replicate within the
-body of this guide, however it is available `online
-<http://github.com/Pylons/pyramid/blob/master/docs/tutorials/wiki/src/views/tutorial/static/style.css>`_.
+Our templates name a single static asset named ``pylons.css``. We don't need
+to create this file within our package's ``static`` directory because it was
+provided at the time we created the project. This file is a little too long to
+replicate within the body of this guide, however it is available `online
+<http://github.com/Pylons/pyramid/blob/master/docs/tutorials/wiki/src/views/tutorial/static/pylons.css>`_.
This CSS file will be accessed via
-e.g. ``http://localhost:6543/static/style.css`` by virtue of the call to
+e.g. ``http://localhost:6543/static/pylons.css`` by virtue of the call to
``add_static_view`` directive we've made in the ``__init__`` file. Any
number and type of static assets can be placed in this directory (or
-subdirectories) and are just referred to by URL within templates.
+subdirectories) and are just referred to by URL or by using the convenience
+method ``static_url`` e.g. ``request.static_url('{{package}}:static/foo.css')``
+within templates.
Testing the Views
=================
@@ -308,7 +310,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\python setup.py test -q
+ c:\pyramidtut\tutorial> ..\Scripts\python setup.py test -q
The expected result looks something like:
diff --git a/docs/tutorials/wiki/distributing.rst b/docs/tutorials/wiki/distributing.rst
index ad717e72a..855d54eab 100644
--- a/docs/tutorials/wiki/distributing.rst
+++ b/docs/tutorials/wiki/distributing.rst
@@ -18,7 +18,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut> ..\Scripts\python setup.py sdist
+ c:\pyramidtut> ..\Scripts\python setup.py sdist
.. warning:: If your project files are not checked in to a version
control repository (such as Subversion), the dist tarball will
diff --git a/docs/tutorials/wiki/installation.rst b/docs/tutorials/wiki/installation.rst
index 82265170d..95bc7a03e 100644
--- a/docs/tutorials/wiki/installation.rst
+++ b/docs/tutorials/wiki/installation.rst
@@ -26,28 +26,28 @@ Preparation, UNIX
<http://peak.telecommunity.com/dist/ez_setup.py>`_ and run it using
the ``python`` interpreter of your Python 2.6 installation:
- .. code-block:: bash
+ .. code-block:: text
$ /path/to/my/Python-2.6/bin/python ez_setup.py
#. Use that Python's `bin/easy_install` to install `virtualenv`:
- .. code-block:: bash
+ .. code-block:: text
$ /path/to/my/Python-2.6/bin/easy_install virtualenv
#. Use that Python's virtualenv to make a workspace:
- .. code-block:: bash
+ .. code-block:: text
$ path/to/my/Python-2.6/bin/virtualenv --no-site-packages \
- bigfntut
+ pyramidtut
-#. Switch to the ``bigfntut`` directory:
+#. Switch to the ``pyramidtut`` directory:
- .. code-block:: bash
+ .. code-block:: text
- $ cd bigfntut
+ $ cd pyramidtut
#. (Optional) Consider using ``source bin/activate`` to make your
shell environment wired to use the virtualenv.
@@ -55,14 +55,14 @@ Preparation, UNIX
#. Use ``easy_install`` to get :app:`Pyramid` and its direct
dependencies installed:
- .. code-block:: bash
+ .. code-block:: text
$ bin/easy_install pyramid
#. Use ``easy_install`` to install ``docutils``, ``repoze.tm``,
``repoze.zodbconn``, ``nose`` and ``coverage``:
- .. code-block:: bash
+ .. code-block:: text
$ bin/easy_install docutils repoze.tm repoze.zodbconn \
nose coverage
@@ -79,27 +79,27 @@ Preparation, Windows
the ``python`` interpreter of your Python 2.6 installation using a
command prompt:
- .. code-block:: bat
+ .. code-block:: text
c:\> c:\Python26\python ez_setup.py
#. Use that Python's `bin/easy_install` to install `virtualenv`:
- .. code-block:: bat
+ .. code-block:: text
c:\> c:\Python26\Scripts\easy_install virtualenv
#. Use that Python's virtualenv to make a workspace:
- .. code-block:: bat
+ .. code-block:: text
- c:\> c:\Python26\Scripts\virtualenv --no-site-packages bigfntut
+ c:\> c:\Python26\Scripts\virtualenv --no-site-packages pyramidtut
-#. Switch to the ``bigfntut`` directory:
+#. Switch to the ``pyramidtut`` directory:
- .. code-block:: bat
+ .. code-block:: text
- c:\> cd bigfntut
+ c:\> cd pyramidtut
#. (Optional) Consider using ``bin\activate.bat`` to make your shell
environment wired to use the virtualenv.
@@ -107,16 +107,16 @@ Preparation, Windows
#. Use ``easy_install`` to get :app:`Pyramid` and its direct
dependencies installed:
- .. code-block:: bat
+ .. code-block:: text
- c:\bigfntut> Scripts\easy_install pyramid
+ c:\pyramidtut> Scripts\easy_install pyramid
#. Use ``easy_install`` to install ``docutils``, ``repoze.tm``,
``repoze.zodbconn``, ``nose`` and ``coverage``:
- .. code-block:: bat
+ .. code-block:: text
- c:\bigfntut> Scripts\easy_install docutils repoze.tm \
+ c:\pyramidtut> Scripts\easy_install docutils repoze.tm \
repoze.zodbconn nose coverage
.. _making_a_project:
@@ -129,19 +129,19 @@ variety of templates to generate sample projects. For this tutorial,
we will use the :term:`ZODB` -oriented template named ``pyramid_zodb``.
The below instructions assume your current working directory is the
-"virtualenv" named "bigfntut".
+"virtualenv" named "pyramidtut".
On UNIX:
-.. code-block:: bash
+.. code-block:: text
$ bin/paster create -t pyramid_zodb tutorial
On Windows:
-.. code-block:: bat
+.. code-block:: text
- c:\bigfntut> Scripts\paster create -t pyramid_zodb tutorial
+ c:\pyramidtut> Scripts\paster create -t pyramid_zodb tutorial
.. note:: If you are using Windows, the ``pyramid_zodb`` Paster template
doesn't currently deal gracefully with installation into a location
@@ -160,17 +160,17 @@ directory you created in :ref:`making_a_project`, and run the
On UNIX:
-.. code-block:: bash
+.. code-block:: text
$ cd tutorial
$ ../bin/python setup.py develop
On Windows:
-.. code-block:: bat
+.. code-block:: text
- C:\bigfntut> cd tutorial
- C:\bigfntut\tutorial> ..\Scripts\python setup.py develop
+ C:\pyramidtut> cd tutorial
+ C:\pyramidtut\tutorial> ..\Scripts\python setup.py develop
.. _running_tests:
@@ -182,15 +182,15 @@ the tests for the project.
On UNIX:
-.. code-block:: bash
+.. code-block:: text
$ ../bin/python setup.py test -q
On Windows:
-.. code-block:: bat
+.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\python setup.py test -q
+ c:\pyramidtut\tutorial> ..\Scripts\python setup.py test -q
Starting the Application
========================
@@ -199,15 +199,15 @@ Start the application.
On UNIX:
-.. code-block:: bash
+.. code-block:: text
$ ../bin/paster serve development.ini --reload
On Windows:
-.. code-block:: bat
+.. code-block:: text
- c:\bifgfntut\tutorial> ..\Scripts\paster serve development.ini --reload
+ c:\pyramidtut\tutorial> ..\Scripts\paster serve development.ini --reload
Exposing Test Coverage Information
==================================
@@ -220,15 +220,15 @@ tests.
On UNIX:
-.. code-block:: bash
+.. code-block:: text
$ ../bin/nosetests --cover-package=tutorial --cover-erase --with-coverage
On Windows:
-.. code-block:: bat
+.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
+ c:\pyramidtut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
--cover-erase --with-coverage
Looks like the code in the ``pyramid_zodb`` template for ZODB projects is
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/footerbg.png b/docs/tutorials/wiki/src/authorization/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/headerbg.png b/docs/tutorials/wiki/src/authorization/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/ie6.css b/docs/tutorials/wiki/src/authorization/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/logo.png b/docs/tutorials/wiki/src/authorization/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki/src/authorization/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/middlebg.png b/docs/tutorials/wiki/src/authorization/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css b/docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/pyramid-small.png b/docs/tutorials/wiki/src/authorization/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/pyramid.png b/docs/tutorials/wiki/src/authorization/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/style.css b/docs/tutorials/wiki/src/authorization/tutorial/static/style.css
deleted file mode 100644
index cad87e0d4..000000000
--- a/docs/tutorials/wiki/src/authorization/tutorial/static/style.css
+++ /dev/null
@@ -1,109 +0,0 @@
-html, body {
- color: black;
- background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
- margin: 0;
- padding: 0;
-}
-
-td, th {padding:3px;border:none;}
-tr th {text-align:left;background-color:#f0f0f0;color:#333;}
-tr.odd td {background-color:#edf3fe;}
-tr.even td {background-color:#fff;}
-
-#header {
- height: 80px;
- width: 777px;
- background: blue URL('../images/header_inner.png') no-repeat;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- margin: 0 auto 0 auto;
-}
-
-a.link, a, a.active {
- color: #369;
-}
-
-
-#main_content {
- color: black;
- font-size: 127%;
- background-color: white;
- width: 757px;
- margin: 0 auto 0 auto;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- padding: 10px;
-}
-
-#sidebar {
- border: 1px solid #aaa;
- background-color: #eee;
- margin: 0.5em;
- padding: 1em;
- float: right;
- width: 200px;
- font-size: 88%;
-}
-
-#sidebar h2 {
- margin-top: 0;
-}
-
-#sidebar ul {
- margin-left: 1.5em;
- padding-left: 0;
-}
-
-h1,h2,h3,h4,h5,h6,#getting_started_steps {
- font-family: "Century Schoolbook L", Georgia, serif;
- font-weight: bold;
-}
-
-h2 {
- font-size: 150%;
-}
-
-#footer {
- border: 1px solid #aaa;
- border-top: 0px none;
- color: #999;
- background-color: white;
- padding: 10px;
- font-size: 80%;
- text-align: center;
- width: 757px;
- margin: 0 auto 1em auto;
-}
-
-.code {
- font-family: monospace;
-}
-
-span.code {
- font-weight: bold;
- background: #eee;
-}
-
-#status_block {
- margin: 0 auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- background: #cec URL('../images/ok.png') left center no-repeat;
- border: 1px solid #9c9;
- width: 450px;
- font-size: 120%;
- font-weight: bolder;
-}
-
-.notice {
- margin: 0.5em auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- width: 450px;
- background: #eef URL('../images/info.png') left center no-repeat;
- border: 1px solid #cce;
-}
-
-.fielderror {
- color: red;
- font-weight: bold;
-}
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/static/transparent.gif b/docs/tutorials/wiki/src/authorization/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki/src/authorization/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt b/docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt
index 5f8b22207..b5fa54dec 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt
+++ b/docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt
@@ -1,34 +1,61 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.__name__} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
- <div style="float:right; width: 10em;"> Viewing
- <span tal:replace="page.__name__">Page Name Goes Here</span> <br/>
- You can return to the <a href="${request.application_url}"
- >FrontPage</a>.
- <span tal:condition="logged_in"><a
- href="${request.application_url}/logout">Logout</a></span>
- </div>
-
- <div>
- <form action="${save_url}" method="post">
- <textarea name="body" tal:content="page.data" rows="10" cols="60"/>
- <input type="submit" name="form.submitted" value="Save"/>
- </form>
- </div>
-</div>
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Editing <b><span tal:replace="page.__name__">Page Name
+ Goes Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right">
+ <span tal:condition="logged_in">
+ <a href="${request.application_url}/logout">Logout</a>
+ </span>
+ </div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <form action="${save_url}" method="post">
+ <textarea name="body" tal:content="page.data" rows="10"
+ cols="60"/><br/>
+ <input type="submit" name="form.submitted" value="Save"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt b/docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt
index c56983d64..554b4ea87 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt
+++ b/docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt
@@ -1,32 +1,57 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <title>Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki)</title>
- <link rel="stylesheet" type="text/css"
- href="${request.application_url}/static/style.css" />
+ <title>Login - Pyramid tutorial wiki (based on TurboGears
+ 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<h1>Log In</h1>
-
-<div tal:replace="message"/>
-
-<div class="main_content">
- <form action="${url}" method="post">
- <input type="hidden" name="came_from" value="${came_from}"/>
- <input type="text" name="login" value="${login}"/>
- <br/>
- <input type="password" name="password" value="${password}"/>
- <br/>
- <input type="submit" name="form.submitted" value="Log In"/>
- </form>
-</div>
-
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ <b>Login</b><br/>
+ <span tal:replace="message"/>
+ </div>
+ <div id="right" class="app-welcome align-right"></div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <form action="${url}" method="post">
+ <input type="hidden" name="came_from" value="${came_from}"/>
+ <input type="text" name="login" value="${login}"/><br/>
+ <input type="password" name="password"
+ value="${password}"/><br/>
+ <input type="submit" name="form.submitted" value="Log In"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt
index a5a0dd214..e31a342b2 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt
@@ -5,65 +5,71 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
<body>
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
- <div id="top">
- <div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
- <p class="app-welcome">
- Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
- the Pyramid web application development framework.
- </p>
+ <div id="wrap">
+ <div id="top">
+ <div class="top align-center">
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
</div>
- </div>
- <div id="bottom">
- <div class="bottom">
- <div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
- <input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
- </form>
+ <div id="middle">
+ <div class="middle align-center">
+ <p class="app-welcome">
+ Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
+ the Pyramid web application development framework.
+ </p>
</div>
- <div id="right" class="align-left">
- <h3>Pyramid links</h3>
- <ul class="links">
- <li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
- </li>
- <li>
- <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
- </li>
- </ul>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div id="left" class="align-right">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
+ <input type="text" id="q" name="q" value="" />
+ <input type="submit" id="x" value="Go" />
+ </form>
+ </div>
+ <div id="right" class="align-left">
+ <h2>Pyramid links</h2>
+ <ul class="links">
+ <li>
+ <a href="http://pylonsproject.org">Pylons Website</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
+ </li>
+ <li>
+ <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
+ </li>
+ </ul>
+ </div>
</div>
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt b/docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt
index f957176f1..d77d174c1 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt
+++ b/docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt
@@ -1,31 +1,64 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.__name__} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
-<div style="float:right; width: 10em;"> Viewing
-<span tal:replace="page.__name__">Page Name Goes Here</span> <br/>
-You can return to the <a href="${request.application_url}">FrontPage</a>.
-<span tal:condition="logged_in">
- <a href="${request.application_url}/logout">Logout</a>
-</span>
-</div>
-
-<div tal:replace="structure content">Page text goes here.</div>
-<p><a tal:attributes="href edit_url" href="">Edit this page</a></p>
-</div>
-
-</body></html>
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Viewing <b><span tal:replace="page.__name__">Page Name
+ Goes Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right">
+ <span tal:condition="logged_in">
+ <a href="${request.application_url}/logout">Logout</a>
+ </span>
+ </div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div tal:replace="structure content">
+ Page text goes here.
+ </div>
+ <p>
+ <a tal:attributes="href edit_url" href="">
+ Edit this page
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
+</body>
+</html>
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/views.py b/docs/tutorials/wiki/src/authorization/tutorial/views.py
index 183cb2a8d..a83e17de4 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/views.py
+++ b/docs/tutorials/wiki/src/authorization/tutorial/views.py
@@ -13,7 +13,7 @@ wikiwords = re.compile(r"\b([A-Z]\w+[A-Z]+\w+)")
@view_config(context='tutorial.models.Wiki', permission='view')
def view_wiki(context, request):
- return HTTPFound(location = resource_url(context, request, 'FrontPage'))
+ return HTTPFound(location=resource_url(context, request, 'FrontPage'))
@view_config(context='tutorial.models.Page',
renderer='templates/view.pt', permission='view')
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/footerbg.png b/docs/tutorials/wiki/src/basiclayout/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/headerbg.png b/docs/tutorials/wiki/src/basiclayout/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/ie6.css b/docs/tutorials/wiki/src/basiclayout/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/logo.png b/docs/tutorials/wiki/src/basiclayout/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki/src/basiclayout/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/middlebg.png b/docs/tutorials/wiki/src/basiclayout/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css b/docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid-small.png b/docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid.png b/docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/static/transparent.gif b/docs/tutorials/wiki/src/basiclayout/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt
index 6ad23d44f..2a2340683 100644
--- a/docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt
@@ -5,23 +5,22 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
- <!--[if !IE 7]>
- <style type="text/css">
- #wrap {display:table;height:100%}
- </style>
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
<div id="top">
<div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
@@ -31,38 +30,35 @@
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
<input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
+ <input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
- <h3>Pyramid links</h3>
+ <h2>Pyramid links</h2>
<ul class="links">
<li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/">The Pylons Project Documentation</a>
+ <a href="http://pylonsproject.org/">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
</li>
<li>
<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
@@ -73,7 +69,7 @@
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/tests.py b/docs/tutorials/wiki/src/basiclayout/tutorial/tests.py
index 0a3d507a0..1f3c3bb4d 100644
--- a/docs/tutorials/wiki/src/basiclayout/tutorial/tests.py
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/tests.py
@@ -1,15 +1,13 @@
import unittest
-from pyramid.config import Configurator
from pyramid import testing
class ViewTests(unittest.TestCase):
def setUp(self):
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
- self.config.end()
+ testing.tearDown()
def test_my_view(self):
from tutorial.views import my_view
diff --git a/docs/tutorials/wiki/src/basiclayout/tutorial/views.py b/docs/tutorials/wiki/src/basiclayout/tutorial/views.py
index 555f49e6d..157b9ac8f 100644
--- a/docs/tutorials/wiki/src/basiclayout/tutorial/views.py
+++ b/docs/tutorials/wiki/src/basiclayout/tutorial/views.py
@@ -1,6 +1,7 @@
from pyramid.view import view_config
from tutorial.models import MyModel
-@view_config(context=MyModel, renderer='tutorial:templates/mytemplate.pt')
+@view_config(context=MyModel,
+ renderer='tutorial:templates/mytemplate.pt')
def my_view(request):
return {'project':'tutorial'}
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/footerbg.png b/docs/tutorials/wiki/src/models/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/headerbg.png b/docs/tutorials/wiki/src/models/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/ie6.css b/docs/tutorials/wiki/src/models/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/logo.png b/docs/tutorials/wiki/src/models/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki/src/models/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/middlebg.png b/docs/tutorials/wiki/src/models/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/pylons.css b/docs/tutorials/wiki/src/models/tutorial/static/pylons.css
index c153be07f..a9f49cc85 100644
--- a/docs/tutorials/wiki/src/models/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki/src/models/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-snall,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/pyramid-small.png b/docs/tutorials/wiki/src/models/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/pyramid.png b/docs/tutorials/wiki/src/models/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/static/transparent.gif b/docs/tutorials/wiki/src/models/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki/src/models/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt
index a5a0dd214..e31a342b2 100644
--- a/docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt
@@ -5,65 +5,71 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
<body>
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
- <div id="top">
- <div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
- <p class="app-welcome">
- Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
- the Pyramid web application development framework.
- </p>
+ <div id="wrap">
+ <div id="top">
+ <div class="top align-center">
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
</div>
- </div>
- <div id="bottom">
- <div class="bottom">
- <div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
- <input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
- </form>
+ <div id="middle">
+ <div class="middle align-center">
+ <p class="app-welcome">
+ Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
+ the Pyramid web application development framework.
+ </p>
</div>
- <div id="right" class="align-left">
- <h3>Pyramid links</h3>
- <ul class="links">
- <li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
- </li>
- <li>
- <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
- </li>
- </ul>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div id="left" class="align-right">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
+ <input type="text" id="q" name="q" value="" />
+ <input type="submit" id="x" value="Go" />
+ </form>
+ </div>
+ <div id="right" class="align-left">
+ <h2>Pyramid links</h2>
+ <ul class="links">
+ <li>
+ <a href="http://pylonsproject.org">Pylons Website</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
+ </li>
+ <li>
+ <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
+ </li>
+ </ul>
+ </div>
</div>
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki/src/models/tutorial/tests.py b/docs/tutorials/wiki/src/models/tutorial/tests.py
index 839964538..51c97a95d 100644
--- a/docs/tutorials/wiki/src/models/tutorial/tests.py
+++ b/docs/tutorials/wiki/src/models/tutorial/tests.py
@@ -1,6 +1,5 @@
import unittest
-from pyramid.config import Configurator
from pyramid import testing
class PageModelTests(unittest.TestCase):
@@ -50,11 +49,10 @@ class AppmakerTests(unittest.TestCase):
class ViewTests(unittest.TestCase):
def setUp(self):
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
- self.config.end()
+ testing.tearDown()
def test_my_view(self):
from tutorial.views import my_view
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/footerbg.png b/docs/tutorials/wiki/src/views/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/headerbg.png b/docs/tutorials/wiki/src/views/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/ie6.css b/docs/tutorials/wiki/src/views/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/logo.png b/docs/tutorials/wiki/src/views/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki/src/views/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/middlebg.png b/docs/tutorials/wiki/src/views/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/pylons.css b/docs/tutorials/wiki/src/views/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki/src/views/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki/src/views/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/pyramid-small.png b/docs/tutorials/wiki/src/views/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/pyramid.png b/docs/tutorials/wiki/src/views/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/style.css b/docs/tutorials/wiki/src/views/tutorial/static/style.css
deleted file mode 100644
index cad87e0d4..000000000
--- a/docs/tutorials/wiki/src/views/tutorial/static/style.css
+++ /dev/null
@@ -1,109 +0,0 @@
-html, body {
- color: black;
- background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
- margin: 0;
- padding: 0;
-}
-
-td, th {padding:3px;border:none;}
-tr th {text-align:left;background-color:#f0f0f0;color:#333;}
-tr.odd td {background-color:#edf3fe;}
-tr.even td {background-color:#fff;}
-
-#header {
- height: 80px;
- width: 777px;
- background: blue URL('../images/header_inner.png') no-repeat;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- margin: 0 auto 0 auto;
-}
-
-a.link, a, a.active {
- color: #369;
-}
-
-
-#main_content {
- color: black;
- font-size: 127%;
- background-color: white;
- width: 757px;
- margin: 0 auto 0 auto;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- padding: 10px;
-}
-
-#sidebar {
- border: 1px solid #aaa;
- background-color: #eee;
- margin: 0.5em;
- padding: 1em;
- float: right;
- width: 200px;
- font-size: 88%;
-}
-
-#sidebar h2 {
- margin-top: 0;
-}
-
-#sidebar ul {
- margin-left: 1.5em;
- padding-left: 0;
-}
-
-h1,h2,h3,h4,h5,h6,#getting_started_steps {
- font-family: "Century Schoolbook L", Georgia, serif;
- font-weight: bold;
-}
-
-h2 {
- font-size: 150%;
-}
-
-#footer {
- border: 1px solid #aaa;
- border-top: 0px none;
- color: #999;
- background-color: white;
- padding: 10px;
- font-size: 80%;
- text-align: center;
- width: 757px;
- margin: 0 auto 1em auto;
-}
-
-.code {
- font-family: monospace;
-}
-
-span.code {
- font-weight: bold;
- background: #eee;
-}
-
-#status_block {
- margin: 0 auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- background: #cec URL('../images/ok.png') left center no-repeat;
- border: 1px solid #9c9;
- width: 450px;
- font-size: 120%;
- font-weight: bolder;
-}
-
-.notice {
- margin: 0.5em auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- width: 450px;
- background: #eef URL('../images/info.png') left center no-repeat;
- border: 1px solid #cce;
-}
-
-.fielderror {
- color: red;
- font-weight: bold;
-}
diff --git a/docs/tutorials/wiki/src/views/tutorial/static/transparent.gif b/docs/tutorials/wiki/src/views/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki/src/views/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki/src/views/tutorial/templates/edit.pt b/docs/tutorials/wiki/src/views/tutorial/templates/edit.pt
index 1d40f526d..c6c589c1a 100644
--- a/docs/tutorials/wiki/src/views/tutorial/templates/edit.pt
+++ b/docs/tutorials/wiki/src/views/tutorial/templates/edit.pt
@@ -1,32 +1,57 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.__name__} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
- <div style="float:right; width: 10em;"> Viewing
- <span tal:replace="page.__name__">Page Name Goes Here</span> <br/>
- You can return to the <a href="${request.application_url}"
- >FrontPage</a>.
- </div>
-
- <div>
- <form action="${save_url}" method="post">
- <textarea name="body" tal:content="page.data" rows="10" cols="60"/>
- <input type="submit" name="form.submitted" value="Save"/>
- </form>
- </div>
-</div>
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Editing <b><span tal:replace="page.__name__">Page Name Goes
+ Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right"></div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <form action="${save_url}" method="post">
+ <textarea name="body" tal:content="page.data" rows="10"
+ cols="60"/><br/>
+ <input type="submit" name="form.submitted" value="Save"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt
index a5a0dd214..e31a342b2 100644
--- a/docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt
@@ -5,65 +5,71 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
<body>
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
- <div id="top">
- <div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
- <p class="app-welcome">
- Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
- the Pyramid web application development framework.
- </p>
+ <div id="wrap">
+ <div id="top">
+ <div class="top align-center">
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
</div>
- </div>
- <div id="bottom">
- <div class="bottom">
- <div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
- <input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
- </form>
+ <div id="middle">
+ <div class="middle align-center">
+ <p class="app-welcome">
+ Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
+ the Pyramid web application development framework.
+ </p>
</div>
- <div id="right" class="align-left">
- <h3>Pyramid links</h3>
- <ul class="links">
- <li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
- </li>
- <li>
- <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
- </li>
- </ul>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div id="left" class="align-right">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
+ <input type="text" id="q" name="q" value="" />
+ <input type="submit" id="x" value="Go" />
+ </form>
+ </div>
+ <div id="right" class="align-left">
+ <h2>Pyramid links</h2>
+ <ul class="links">
+ <li>
+ <a href="http://pylonsproject.org">Pylons Website</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
+ </li>
+ <li>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
+ </li>
+ <li>
+ <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
+ </li>
+ </ul>
+ </div>
</div>
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki/src/views/tutorial/templates/view.pt b/docs/tutorials/wiki/src/views/tutorial/templates/view.pt
index 50719f9e9..97b87c44f 100644
--- a/docs/tutorials/wiki/src/views/tutorial/templates/view.pt
+++ b/docs/tutorials/wiki/src/views/tutorial/templates/view.pt
@@ -1,29 +1,60 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.__name__} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
-<div style="float:right; width: 10em;"> Viewing
-<span tal:replace="page.__name__">Page Name Goes Here</span> <br/>
-You can return to the
-<a href="${request.application_url}">FrontPage</a>.
-</div>
-
-<div tal:replace="structure content">Page text goes here.</div>
-<p><a tal:attributes="href edit_url" href="">Edit this page</a></p>
-</div>
-
-</body></html>
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Viewing <b><span tal:replace="page.__name__">Page Name Goes
+ Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right"></div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div tal:replace="structure content">
+ Page text goes here.
+ </div>
+ <p>
+ <a tal:attributes="href edit_url" href="">
+ Edit this page
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
+</body>
+</html>
diff --git a/docs/tutorials/wiki/src/views/tutorial/views.py b/docs/tutorials/wiki/src/views/tutorial/views.py
index c96bc2e9c..42420f2fe 100644
--- a/docs/tutorials/wiki/src/views/tutorial/views.py
+++ b/docs/tutorials/wiki/src/views/tutorial/views.py
@@ -12,7 +12,7 @@ wikiwords = re.compile(r"\b([A-Z]\w+[A-Z]+\w+)")
@view_config(context='tutorial.models.Wiki')
def view_wiki(context, request):
- return HTTPFound(location = resource_url(context, request, 'FrontPage'))
+ return HTTPFound(location=resource_url(context, request, 'FrontPage'))
@view_config(context='tutorial.models.Page',
renderer='tutorial:templates/view.pt')
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst
index 8d30ab807..3f1d2669a 100644
--- a/docs/tutorials/wiki2/authorization.rst
+++ b/docs/tutorials/wiki2/authorization.rst
@@ -125,7 +125,7 @@ Adding ``security.py``
~~~~~~~~~~~~~~~~~~~~~~
Add a ``security.py`` module within your package (in the same directory as
-"__init__.py", "views.py", etc) with the following content:
+:file:`__init__.py`, :file:`views.py`, etc) with the following content:
.. literalinclude:: src/authorization/tutorial/security.py
:linenos:
@@ -202,8 +202,8 @@ Add a ``login.pt`` template to your templates directory. It's
referred to within the login view we just added to ``login.py``.
.. literalinclude:: src/authorization/tutorial/templates/login.pt
- :linenos:
:language: xml
+ :tab-width: 2
Change ``view.pt`` and ``edit.pt``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -212,11 +212,10 @@ We'll also need to change our ``edit.pt`` and ``view.pt`` templates to
display a "Logout" link if someone is logged in. This link will
invoke the logout view.
-To do so we'll add this to both templates within the ``<div
-class="main_content">`` div:
+To do so we'll add this to both templates within the ``<div id="right"
+class="app-welcome align-right">`` div:
.. code-block:: xml
- :linenos:
<span tal:condition="logged_in">
<a href="${request.application_url}/logout">Logout</a>
@@ -261,14 +260,14 @@ Our ``views.py`` module will look something like this when we're done:
Our ``edit.pt`` template will look something like this when we're done:
.. literalinclude:: src/authorization/tutorial/templates/edit.pt
- :linenos:
:language: xml
+ :tab-width: 2
Our ``view.pt`` template will look something like this when we're done:
.. literalinclude:: src/authorization/tutorial/templates/view.pt
- :linenos:
:language: xml
+ :tab-width: 2
Revisiting the Application
---------------------------
@@ -279,5 +278,353 @@ of hitting an edit or add page and submitting the login form with the
hand corner. When we click it, we're logged out, and redirected back
to the front page.
+.. _wiki2_flow_of_authentication:
+
+Overall flow of an authentication
+---------------------------------
+
+Now that you have seen all the pieces of the authentication
+mechanism, here are some examples that show how they all work
+together.
+
+#. Failed login: The user requests ``/FrontPage/edit_page``. The
+ site presents the login form. The user enters ``editor`` as
+ the login, but enters an invalid password ``bad``.
+ The site redisplays the login form with the message "Failed
+ login". See :ref:`failed_login`.
+
+#. The user again requests ``/FrontPage/edit_page``. The site
+ presents the login form, and this time the user enters
+ login ``editor`` and password ``editor``. The site presents
+ the edit form with the content of ``/FrontPage``. The user
+ makes some changes and saves them. See :ref:`good_login`.
+
+#. The user again revisits ``/FrontPage/edit_page``. The site
+ goes immediately to the edit form without requesting
+ credentials. See :ref:`revisit`.
+
+#. The user clicks the ``Logout`` link. See :ref:`logging_out`.
+
+.. _failed_login:
+
+Failed login
+~~~~~~~~~~~~
+
+The process starts when the user enters URL
+``http://localhost:6543/FrontPage/edit_page``. Let's assume that
+this is the first request ever made to the application and the
+page database is empty except for the ``Page`` instance created
+for the front page by the ``initialize_sql`` function in
+:file:`models.py`.
+
+This process involves two complete request/response cycles.
+
+1. From the front page, the user clicks :guilabel:`Edit page`.
+ The request is to ``/FrontPage/edit_page``. The view callable
+ is ``login.login``. The response is the ``login.pt`` template
+ with blank fields.
+
+2. The user enters invalid credentials and clicks :guilabel:`Log
+ in`. A ``POST`` request is sent to ``/FrontPage/edit_page``.
+ The view callable is again ``login.login``. The response is
+ the ``login.pt`` template showing the message "Failed login",
+ with the entry fields displaying their former values.
+
+Cycle 1:
+
+#. During URL dispatch, the route ``'/{pagename}/edit_page'`` is
+ considered for matching. The associated view has a
+ ``view_permission='edit'`` permission attached, so the
+ dispatch logic has to verify that the user has that permission
+ or the route is not considered to match.
+
+ The context for all route matching comes from the configured
+ root factory, :meth:`RootFactory` in :file:`models.py`.
+ This class has an ``__acl__`` attribute that defines the
+ access control list for all routes::
+
+ __acl__ = [ (Allow, Everyone, 'view'),
+ (Allow, 'group:editors', 'edit') ]
+
+ In practice, this means that for any route that requires the
+ ``edit`` permission, the user must be authenticated and
+ have the ``group:editors`` principal or the route is not
+ considered to match.
+
+#. To find the list of the user's principals, the authorization
+ first policy checks to see if the user has a
+ ``paste.auth.auth_tkt`` cookie. Since the user has never been
+ to the site, there is no such cookie, and the user is
+ considered to be unauthenticated.
+
+#. Since the user is unauthenticated, the ``groupfinder``
+ function in :file:`security.py` is called with ``None`` as its
+ ``userid`` argument. The function returns an empty list of
+ principals.
+
+#. Because that list does not contain the ``group:editors``
+ principal, the ``'/{pagename}/edit_page'`` route's ``edit``
+ permission fails, and the route does not match.
+
+#. Because no routes match, the `forbidden view` callable is
+ invoked: the ``login`` function in module ``login.py``.
+
+#. Inside the ``login`` function, the value of ``login_url`` is
+ ``http://localhost:6543/login``, and the value of
+ ``referrer`` is ``http://localhost:6543/FrontPage/edit_page``.
+
+ Because ``request.params`` has no key for ``'came_from'``, the
+ variable ``came_from`` is also set to
+ ``http://localhost:6543/FrontPage/edit_page``. Variables
+ ``message``, ``login``, and ``password`` are set to the empty
+ string.
+
+ Because ``request.params`` has no key for
+ ``'form.submitted'``, the ``login`` function returns this
+ dictionary::
+
+ {'message': '', 'url':'http://localhost:6543/login',
+ 'came_from':'http://localhost:6543/FrontPage/edit_page',
+ 'login':'', 'password':''}
+
+#. This dictionary is used to render the ``login.pt`` template.
+ In the form, the ``action`` attribute is
+ ``http://localhost:6543/login``, and the value of
+ ``came_from`` is included in that form as a hidden field
+ by this line in the template::
+
+ <input type="hidden" name="came_from" value="${came_from}"/>
+
+Cycle 2:
+
+#. The user enters incorrect credentials and clicks the
+ :guilabel:`Log in` button, which does a ``POST`` request to
+ URL ``http://localhost:6543/login``. The name of the
+ :guilabel:`Log in` button in this form is ``form.submitted``.
+
+#. The route with pattern ``'/login'`` matches this URL, so
+ control is passed again to the ``login`` view callable.
+
+#. The ``login_url`` and ``referrer`` have the same value
+ this time (``http://localhost:6543/login``), so variable
+ ``referrer`` is set to ``'/'``.
+
+ Since ``request.params`` does have a key ``'form.submitted'``,
+ the values of ``login`` and ``password`` are retrieved from
+ ``request.params``.
+
+ Because the login and password do not match any of the entries
+ in the ``USERS`` dictionary in ``security.py``, variable
+ ``message`` is set to ``'Failed login'``.
+
+ The view callable returns this dictionary::
+
+ {'message':'Failed login',
+ 'url':'http://localhost:6543/login', 'came_from':'/',
+ 'login':'editor', 'password':'bad'}
+
+#. The ``login.pt`` template is rendered using those values.
+
+.. _good_login:
+
+Successful login
+~~~~~~~~~~~~~~~~
+
+In this scenario, the user again requests URL
+``/FrontPage/edit_page``.
+
+This process involves four complete request/response cycles.
+
+1. The user clicks :guilabel:`Edit page`. The view callable is
+ ``login.login``. The response is template ``login.pt``,
+ with all the fields blank.
+
+2. The user enters valid credentials and clicks :guilabel:`Log in`.
+ The view callable is ``login.login``. The response is a
+ redirect to ``/FrontPage/edit_page``.
+
+3. The view callable is ``views.edit_page``. The response
+ renders template ``edit.pt``, displaying the current page
+ content.
+
+4. The user edits the content and clicks :guilabel:`Save`.
+ The view callable is ``views.edit_page``. The response
+ is a redirect to ``/FrontPage``.
+
+Execution proceeds as in :ref:`failed_login`, up to the point
+where the password ``editor`` is successfully matched against the
+value from the ``USERS`` dictionary.
+
+Cycle 2:
+
+#. Within the ``login.login`` view callable, the value of
+ ``login_url`` is ``http://localhost:6543/login``, and the
+ value of ``referrer`` is ``'/'``, and ``came_from`` is
+ ``http://localhost:6543/FrontPage/edit_page`` when this block
+ is executed:
+
+ .. code-block:: python
+
+ if USERS.get(login) == password:
+ headers = remember(request, login)
+ return HTTPFound(location=came_from, headers=headers)
+
+#. Because the password matches this time,
+ :mod:`pyramid.security.remember` returns a sequence of header
+ tuples that will set a ``paste.auth.auth_tkt`` authentication
+ cookie in the user's browser for the login ``'editor'``.
+
+#. The ``HTTPFound`` exception returns a response that redirects
+ the browser to ``http://localhost:6543/FrontPage/edit_page``,
+ including the headers that set the authentication cookie.
+
+Cycle 3:
+
+#. Route pattern ``'/{pagename}/edit_page'`` matches this URL,
+ but the corresponding view is restricted by an ``'edit'``
+ permission.
+
+#. Because the user now has an authentication cookie defining
+ their login name as ``'editor'``, the ``groupfinder`` function
+ is called with that value as its ``userid`` argument.
+
+#. The ``groupfinder`` function returns the list
+ ``['group:editors']``. This satisfies the access control
+ entry ``(Allow, 'group:editors', 'edit')``, which grants the
+ ``edit`` permission. Thus, this route matches, and control
+ passes to view callable ``edit_page``.
+
+#. Within ``edit_page``, ``name`` is set to ``'FrontPage'``, the
+ page name from ``request.matchdict['pagename']``, and
+ ``page`` is set to an instance of :class:`models.Page`
+ that holds the current content of ``FrontPage``.
+
+#. Since this request did not come from a form,
+ ``request.params`` does not have a key for
+ ``'form.submitted'``.
+
+#. The ``edit_page`` function calls
+ :meth:`pyramid.security.authenticated_userid` to find out
+ whether the user is authenticated. Because of the cookies
+ set previously, the variable ``logged_in`` is set to
+ the userid ``'editor'``.
+
+#. The ``edit_page`` function returns this dictionary::
+
+ {'page':page, 'logged_in':'editor',
+ 'save_url':'http://localhost:6543/FrontPage/edit_page'}
+
+#. Template :file:`edit.pt` is rendered with those values.
+ Among other features of this template, these lines
+ cause the inclusion of a :guilabel:`Logout` link::
+
+ <span tal:condition="logged_in">
+ <a href="${request.application_url}/logout">Logout</a>
+ </span>
+
+ For the example case, this link will refer to
+ ``http://localhost:6543/logout``.
+
+ These lines of the template display the current page's
+ content in a form whose ``action`` attribute is
+ ``http://localhost:6543/FrontPage/edit_page``::
+
+ <form action="${save_url}" method="post">
+ <textarea name="body" tal:content="page.data" rows="10" cols="60"/>
+ <input type="submit" name="form.submitted" value="Save"/>
+ </form>
+
+Cycle 4:
+
+#. The user edits the page content and clicks
+ :guilabel:`Save`.
+
+#. URL ``http://localhost:6543/FrontPage/edit_page`` goes through
+ the same routing as before, up until the line that checks
+ whether ``request.params`` has a key ``'form.submitted'``.
+ This time, within the ``edit_page`` view callable, these
+ lines are executed::
+
+ page.data = request.params['body']
+ session.add(page)
+ return HTTPFound(location = route_url('view_page', request,
+ pagename=name))
+
+ The first two lines replace the old page content with the
+ contents of the ``body`` text area from the form, and then
+ update the page stored in the database. The third line
+ causes a response that redirects the browser to
+ ``http://localhost:6543/FrontPage``.
+
+.. _revisit:
+
+Revisiting after authentication
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In this case, the user has an authentication cookie set in their
+browser that specifies their login as ``'editor'``. The
+requested URL is ``http://localhost:6543/FrontPage/edit_page``.
+
+This process requires two request/response cycles.
+
+1. The user clicks :guilabel:`Edit page`. The view callable is
+ ``views.edit_page``. The response is ``edit.pt``, showing
+ the current page content.
+
+2. The user edits the content and clicks :guilabel:`Save`.
+ The view callable is ``views.edit_page``. The response is
+ a redirect to ``/Frontpage``.
+
+Cycle 1:
+
+#. The route with pattern ``/{pagename}/edit_page`` matches the
+ URL, and because of the authentication cookie, ``groupfinder``
+ returns a list containing the ``group:editors`` principal,
+ which ``models.RootFactory.__acl__`` uses to grant the
+ ``edit`` permission, so this route matches and dispatches
+ to the view callable :meth:`views.edit_page`.
+
+#. In ``edit_page``, because the request did not come from a form
+ submission, ``request.params`` has no key for
+ ``'form.submitted'``.
+
+#. The variable ``logged_in`` is set to the login name
+ ``'editor'`` by calling ``authenticated_userid``, which
+ extracts it from the authentication cookie.
+
+#. The function returns this dictionary::
+
+ {'page':page,
+ 'save_url':'http://localhost:6543/FrontPage/edit_page',
+ 'logged_in':'editor'}
+
+#. Template :file:`edit.pt` is rendered with the values from
+ that dictionary. Because of the presence of the
+ ``'logged_in'`` entry, a :guilabel:`Logout` link appears.
+
+Cycle 2:
+
+#. The user edits the page content and clicks :guilabel:`Save`.
+
+#. The ``POST`` operation works as in :ref:`good_login`.
+
+.. _logging_out:
+
+Logging out
+~~~~~~~~~~~
+
+This process starts with a request URL
+``http://localhost:6543/logout``.
+
+#. The route with pattern ``'/logout'`` matches and dispatches
+ to the view callable ``logout`` in :file:`login.py`.
+#. The call to :meth:`pyramid.security.forget` returns a list of
+ header tuples that will, when returned with the response,
+ cause the browser to delete the user's authentication cookie.
+#. The view callable returns an ``HTTPFound`` exception that
+ redirects the browser to named route ``view_wiki``, which
+ will translate to URL ``http://localhost:6543``. It
+ also passes along the headers that delete the
+ authentication cookie.
diff --git a/docs/tutorials/wiki2/definingviews.rst b/docs/tutorials/wiki2/definingviews.rst
index e3d611136..acf539e1a 100644
--- a/docs/tutorials/wiki2/definingviews.rst
+++ b/docs/tutorials/wiki2/definingviews.rst
@@ -212,8 +212,8 @@ Once we're done with the ``view.pt`` template, it will look a lot like
the below:
.. literalinclude:: src/views/tutorial/templates/view.pt
- :linenos:
:language: xml
+ :tab-width: 2
.. note:: The names available for our use in a template are always
those that are present in the dictionary returned by the view
@@ -240,25 +240,26 @@ Once we're done with the ``edit.pt`` template, it will look a lot like
the below:
.. literalinclude:: src/views/tutorial/templates/edit.pt
- :linenos:
:language: xml
+ :tab-width: 2
-Static Resources
-----------------
-Our templates name a single static resource named ``style.css``. We need to
-create this and place it in a file named ``style.css`` within our package's
-``static`` directory. This file is a little too long to replicate within the
-body of this guide, however it is available `online
-<http://github.com/Pylons/pyramid/blob/master/docs/tutorials/wiki2/src/views/tutorial/static/style.css>`_.
+Static Assets
+-------------
+Our templates name a single static asset named ``pylons.css``. We don't need
+to create this file within our package's ``static`` directory because it was
+provided at the time we created the project. This file is a little too long to
+replicate within the body of this guide, however it is available `online
+<http://github.com/Pylons/pyramid/blob/master/docs/tutorials/wiki2/src/views/tutorial/static/pylons.css>`_.
This CSS file will be accessed via
-e.g. ``http://localhost:6543/static/style.css`` by virtue of the call we've
-made to :meth:`pyramid.config.Configurator.add_static_view` within our
-``__init__.py`` file. Any number and type of static resources can be placed
-in this directory (or subdirectories) and are just referred to by URL within
-templates.
+e.g. ``http://localhost:6543/static/pylons.css`` by virtue of the call to
+``add_static_view`` directive we've made in the ``__init__`` file. Any
+number and type of static assets can be placed in this directory (or
+subdirectories) and are just referred to by URL or by using the convenience
+method ``static_url`` e.g. ``request.static_url('{{package}}:static/foo.css')``
+within templates.
Mapping Views to URLs in ``__init__.py``
========================================
diff --git a/docs/tutorials/wiki2/distributing.rst b/docs/tutorials/wiki2/distributing.rst
index f4421e145..9f5db19ae 100644
--- a/docs/tutorials/wiki2/distributing.rst
+++ b/docs/tutorials/wiki2/distributing.rst
@@ -18,7 +18,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut> ..\Scripts\python setup.py sdist
+ c:\pyramidtut> ..\Scripts\python setup.py sdist
.. warning:: If your project files are not checked in to a version
control repository (such as Subversion), the dist tarball will
diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst
index e6fd5e6b9..c957f641e 100644
--- a/docs/tutorials/wiki2/installation.rst
+++ b/docs/tutorials/wiki2/installation.rst
@@ -45,13 +45,13 @@ Preparation, UNIX
.. code-block:: text
- $ path/to/my/Python-2.6/bin/virtualenv --no-site-packages bigfntut
+ $ path/to/my/Python-2.6/bin/virtualenv --no-site-packages pyramidtut
-#. Switch to the ``bigfntut`` directory:
+#. Switch to the ``pyramidtut`` directory:
.. code-block:: text
- $ cd bigfntut
+ $ cd pyramidtut
#. (Optional) Consider using ``source bin/activate`` to make your
shell environment wired to use the virtualenv.
@@ -96,13 +96,13 @@ Preparation, Windows
.. code-block:: text
- c:\> c:\Python26\Scripts\virtualenv --no-site-packages bigfntut
+ c:\> c:\Python26\Scripts\virtualenv --no-site-packages pyramidtut
-#. Switch to the ``bigfntut`` directory:
+#. Switch to the ``pyramidtut`` directory:
.. code-block:: text
- c:\> cd bigfntut
+ c:\> cd pyramidtut
#. (Optional) Consider using ``bin\activate.bat`` to make your shell
environment wired to use the virtualenv.
@@ -112,13 +112,13 @@ Preparation, Windows
.. code-block:: text
- c:\bigfntut> Scripts\easy_install pyramid
+ c:\pyramidtut> Scripts\easy_install pyramid
#. Use ``easy_install`` to install various packages from PyPI.
.. code-block:: text
- c:\bigfntut> Scripts\easy_install -i docutils \
+ c:\pyramidtut> Scripts\easy_install -i docutils \
nose coverage zope.sqlalchemy SQLAlchemy repoze.tm2
@@ -133,7 +133,7 @@ variety of templates to generate sample projects. We will use the
that uses :term:`SQLAlchemy` and :term:`URL dispatch`.
The below instructions assume your current working directory is the
-"virtualenv" named "bigfntut".
+"virtualenv" named "pyramidtut".
On UNIX:
@@ -145,7 +145,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut> Scripts\paster create -t pyramid_routesalchemy tutorial
+ c:\pyramidtut> Scripts\paster create -t pyramid_routesalchemy tutorial
.. note:: If you are using Windows, the ``pyramid_routesalchemy``
Paster template may not deal gracefully with installation into a
@@ -173,8 +173,8 @@ On Windows:
.. code-block:: text
- c:\bigfntut> cd tutorial
- c:\bigfntut\tutorial> ..\Scripts\python setup.py develop
+ c:\pyramidtut> cd tutorial
+ c:\pyramidtut\tutorial> ..\Scripts\python setup.py develop
.. _sql_running_tests:
@@ -194,7 +194,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\python setup.py test -q
+ c:\pyramidtut\tutorial> ..\Scripts\python setup.py test -q
Starting the Application
========================
@@ -211,7 +211,7 @@ On Windows:
.. code-block:: text
- c:\bifgfntut\tutorial> ..\Scripts\paster serve development.ini --reload
+ c:\pyramidtut\tutorial> ..\Scripts\paster serve development.ini --reload
Exposing Test Coverage Information
==================================
@@ -235,7 +235,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\easy_install nose coverage
+ c:\pyramidtut\tutorial> ..\Scripts\easy_install nose coverage
Once ``nose`` and ``coverage`` are installed, we can actually run the
coverage tests.
@@ -250,7 +250,7 @@ On Windows:
.. code-block:: text
- c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
+ c:\pyramidtut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
--cover-erase --with-coverage
Looks like our package's ``models`` module doesn't quite have 100%
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/footerbg.png b/docs/tutorials/wiki2/src/authorization/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/headerbg.png b/docs/tutorials/wiki2/src/authorization/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/ie6.css b/docs/tutorials/wiki2/src/authorization/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/logo.png b/docs/tutorials/wiki2/src/authorization/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki2/src/authorization/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/middlebg.png b/docs/tutorials/wiki2/src/authorization/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css b/docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid-small.png b/docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid.png b/docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/style.css b/docs/tutorials/wiki2/src/authorization/tutorial/static/style.css
deleted file mode 100644
index cad87e0d4..000000000
--- a/docs/tutorials/wiki2/src/authorization/tutorial/static/style.css
+++ /dev/null
@@ -1,109 +0,0 @@
-html, body {
- color: black;
- background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
- margin: 0;
- padding: 0;
-}
-
-td, th {padding:3px;border:none;}
-tr th {text-align:left;background-color:#f0f0f0;color:#333;}
-tr.odd td {background-color:#edf3fe;}
-tr.even td {background-color:#fff;}
-
-#header {
- height: 80px;
- width: 777px;
- background: blue URL('../images/header_inner.png') no-repeat;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- margin: 0 auto 0 auto;
-}
-
-a.link, a, a.active {
- color: #369;
-}
-
-
-#main_content {
- color: black;
- font-size: 127%;
- background-color: white;
- width: 757px;
- margin: 0 auto 0 auto;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- padding: 10px;
-}
-
-#sidebar {
- border: 1px solid #aaa;
- background-color: #eee;
- margin: 0.5em;
- padding: 1em;
- float: right;
- width: 200px;
- font-size: 88%;
-}
-
-#sidebar h2 {
- margin-top: 0;
-}
-
-#sidebar ul {
- margin-left: 1.5em;
- padding-left: 0;
-}
-
-h1,h2,h3,h4,h5,h6,#getting_started_steps {
- font-family: "Century Schoolbook L", Georgia, serif;
- font-weight: bold;
-}
-
-h2 {
- font-size: 150%;
-}
-
-#footer {
- border: 1px solid #aaa;
- border-top: 0px none;
- color: #999;
- background-color: white;
- padding: 10px;
- font-size: 80%;
- text-align: center;
- width: 757px;
- margin: 0 auto 1em auto;
-}
-
-.code {
- font-family: monospace;
-}
-
-span.code {
- font-weight: bold;
- background: #eee;
-}
-
-#status_block {
- margin: 0 auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- background: #cec URL('../images/ok.png') left center no-repeat;
- border: 1px solid #9c9;
- width: 450px;
- font-size: 120%;
- font-weight: bolder;
-}
-
-.notice {
- margin: 0.5em auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- width: 450px;
- background: #eef URL('../images/info.png') left center no-repeat;
- border: 1px solid #cce;
-}
-
-.fielderror {
- color: red;
- font-weight: bold;
-}
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/static/transparent.gif b/docs/tutorials/wiki2/src/authorization/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt b/docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt
index 05e2ecd76..cea9b4932 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt
@@ -1,35 +1,61 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.name} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
- <div style="float:right; width: 10em;"> Viewing
- <span tal:replace="page.name">Page Name Goes Here</span> <br/>
- You can return to the <a href="${request.application_url}"
- >FrontPage</a>.
- <span tal:condition="logged_in">
- <a href="${request.application_url}/logout">Logout</a>
- </span>
- </div>
-
- <div>
- <form action="${save_url}" method="post">
- <textarea name="body" tal:content="page.data" rows="10" cols="60"/>
- <input type="submit" name="form.submitted" value="Save"/>
- </form>
- </div>
-</div>
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Editing <b><span tal:replace="page.name">Page Name
+ Goes Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right">
+ <span tal:condition="logged_in">
+ <a href="${request.application_url}/logout">Logout</a>
+ </span>
+ </div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <form action="${save_url}" method="post">
+ <textarea name="body" tal:content="page.data" rows="10"
+ cols="60"/><br/>
+ <input type="submit" name="form.submitted" value="Save"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt b/docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt
index c56983d64..554b4ea87 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt
@@ -1,32 +1,57 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <title>Pyramid tutorial wiki (based on TurboGears 20-Minute Wiki)</title>
- <link rel="stylesheet" type="text/css"
- href="${request.application_url}/static/style.css" />
+ <title>Login - Pyramid tutorial wiki (based on TurboGears
+ 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<h1>Log In</h1>
-
-<div tal:replace="message"/>
-
-<div class="main_content">
- <form action="${url}" method="post">
- <input type="hidden" name="came_from" value="${came_from}"/>
- <input type="text" name="login" value="${login}"/>
- <br/>
- <input type="password" name="password" value="${password}"/>
- <br/>
- <input type="submit" name="form.submitted" value="Log In"/>
- </form>
-</div>
-
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ <b>Login</b><br/>
+ <span tal:replace="message"/>
+ </div>
+ <div id="right" class="app-welcome align-right"></div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <form action="${url}" method="post">
+ <input type="hidden" name="came_from" value="${came_from}"/>
+ <input type="text" name="login" value="${login}"/><br/>
+ <input type="password" name="password"
+ value="${password}"/><br/>
+ <input type="submit" name="form.submitted" value="Log In"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt
index 6ad23d44f..e31a342b2 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt
@@ -5,23 +5,22 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
- <!--[if !IE 7]>
- <style type="text/css">
- #wrap {display:table;height:100%}
- </style>
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
<div id="top">
<div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
@@ -31,38 +30,35 @@
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
<input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
+ <input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
- <h3>Pyramid links</h3>
+ <h2>Pyramid links</h2>
<ul class="links">
<li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/">The Pylons Project Documentation</a>
+ <a href="http://pylonsproject.org">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
</li>
<li>
<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
@@ -73,7 +69,7 @@
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt b/docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt
index 0c654250a..7d01aefb9 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt
@@ -1,31 +1,64 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.name} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
-<div style="float:right; width: 10em;"> Viewing
-<span tal:replace="page.name">Page Name Goes Here</span> <br/>
-You can return to the <a href="${request.application_url}">FrontPage</a>.
-<span tal:condition="logged_in">
- <a href="${request.application_url}/logout">Logout</a>
-</span>
-</div>
-
-<div tal:replace="structure content">Page text goes here.</div>
-<p><a tal:attributes="href edit_url" href="">Edit this page</a></p>
-</div>
-
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Viewing <b><span tal:replace="page.name">Page Name
+ Goes Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right">
+ <span tal:condition="logged_in">
+ <a href="${request.application_url}/logout">Logout</a>
+ </span>
+ </div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div tal:replace="structure content">
+ Page text goes here.
+ </div>
+ <p>
+ <a tal:attributes="href edit_url" href="">
+ Edit this page
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/tests.py b/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
index 1020a8b99..08916f43c 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
@@ -1,6 +1,5 @@
import unittest
-from pyramid.config import Configurator
from pyramid import testing
def _initTestingDB():
@@ -20,11 +19,10 @@ def _registerRoutes(config):
class ViewWikiTests(unittest.TestCase):
def setUp(self):
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
- self.config.end()
+ testing.tearDown()
def test_it(self):
from tutorial.views import view_wiki
@@ -36,12 +34,10 @@ class ViewWikiTests(unittest.TestCase):
class ViewPageTests(unittest.TestCase):
def setUp(self):
self.session = _initTestingDB()
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
- self.session.remove()
- self.config.end()
+ testing.tearDown()
def _callFUT(self, request):
from tutorial.views import view_page
@@ -71,12 +67,11 @@ class ViewPageTests(unittest.TestCase):
class AddPageTests(unittest.TestCase):
def setUp(self):
self.session = _initTestingDB()
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
self.session.remove()
- self.config.end()
+ testing.tearDown()
def _callFUT(self, request):
from tutorial.views import add_page
@@ -104,12 +99,11 @@ class AddPageTests(unittest.TestCase):
class EditPageTests(unittest.TestCase):
def setUp(self):
self.session = _initTestingDB()
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
self.session.remove()
- self.config.end()
+ testing.tearDown()
def _callFUT(self, request):
from tutorial.views import edit_page
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py b/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
index 9da906752..4fd010c5c 100644
--- a/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
@@ -12,7 +12,8 @@ from sqlalchemy.orm import sessionmaker
from zope.sqlalchemy import ZopeTransactionExtension
-DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
+DBSession = scoped_session(sessionmaker(
+ extension=ZopeTransactionExtension()))
Base = declarative_base()
class MyModel(Base):
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/footerbg.png b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/headerbg.png b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/ie6.css b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/logo.png b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/middlebg.png b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid-small.png b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid.png b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/static/transparent.gif b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt
index 6ad23d44f..e31a342b2 100644
--- a/docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt
@@ -5,23 +5,22 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
- <!--[if !IE 7]>
- <style type="text/css">
- #wrap {display:table;height:100%}
- </style>
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
<div id="top">
<div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
@@ -31,38 +30,35 @@
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
<input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
+ <input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
- <h3>Pyramid links</h3>
+ <h2>Pyramid links</h2>
<ul class="links">
<li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/">The Pylons Project Documentation</a>
+ <a href="http://pylonsproject.org">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
</li>
<li>
<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
@@ -73,7 +69,7 @@
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py b/docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py
index fa3788340..5efa6affa 100644
--- a/docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py
@@ -1,5 +1,4 @@
import unittest
-from pyramid.config import Configurator
from pyramid import testing
def _initTestingDB():
@@ -10,12 +9,11 @@ def _initTestingDB():
class TestMyView(unittest.TestCase):
def setUp(self):
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
_initTestingDB()
def tearDown(self):
- self.config.end()
+ testing.tearDown()
def test_it(self):
from tutorial.views import my_view
diff --git a/docs/tutorials/wiki2/src/models/tutorial/models.py b/docs/tutorials/wiki2/src/models/tutorial/models.py
index 23b8afab8..797fff929 100644
--- a/docs/tutorials/wiki2/src/models/tutorial/models.py
+++ b/docs/tutorials/wiki2/src/models/tutorial/models.py
@@ -12,7 +12,8 @@ from sqlalchemy.orm import sessionmaker
from zope.sqlalchemy import ZopeTransactionExtension
-DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
+DBSession = scoped_session(sessionmaker(
+ extension=ZopeTransactionExtension()))
Base = declarative_base()
class Page(Base):
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/footerbg.png b/docs/tutorials/wiki2/src/models/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/headerbg.png b/docs/tutorials/wiki2/src/models/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/ie6.css b/docs/tutorials/wiki2/src/models/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/logo.png b/docs/tutorials/wiki2/src/models/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki2/src/models/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/middlebg.png b/docs/tutorials/wiki2/src/models/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/pylons.css b/docs/tutorials/wiki2/src/models/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki2/src/models/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/pyramid-small.png b/docs/tutorials/wiki2/src/models/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/pyramid.png b/docs/tutorials/wiki2/src/models/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/static/transparent.gif b/docs/tutorials/wiki2/src/models/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki2/src/models/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt
index 6ad23d44f..e31a342b2 100644
--- a/docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt
@@ -5,23 +5,22 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
- <!--[if !IE 7]>
- <style type="text/css">
- #wrap {display:table;height:100%}
- </style>
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
<div id="top">
<div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
@@ -31,38 +30,35 @@
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
<input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
+ <input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
- <h3>Pyramid links</h3>
+ <h2>Pyramid links</h2>
<ul class="links">
<li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/">The Pylons Project Documentation</a>
+ <a href="http://pylonsproject.org">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
</li>
<li>
<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
@@ -73,7 +69,7 @@
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki2/src/models/tutorial/tests.py b/docs/tutorials/wiki2/src/models/tutorial/tests.py
index 42b0aaada..71f5e21e3 100644
--- a/docs/tutorials/wiki2/src/models/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/models/tutorial/tests.py
@@ -1,5 +1,4 @@
import unittest
-from pyramid.config import Configurator
from pyramid import testing
def _initTestingDB():
@@ -9,12 +8,11 @@ def _initTestingDB():
class TestMyView(unittest.TestCase):
def setUp(self):
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
_initTestingDB()
def tearDown(self):
- self.config.end()
+ testing.tearDown()
def test_it(self):
from tutorial.views import my_view
diff --git a/docs/tutorials/wiki2/src/views/tutorial/__init__.py b/docs/tutorials/wiki2/src/views/tutorial/__init__.py
index 334fde814..1a8d24499 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/__init__.py
+++ b/docs/tutorials/wiki2/src/views/tutorial/__init__.py
@@ -10,7 +10,7 @@ def main(global_config, **settings):
initialize_sql(engine)
config = Configurator(settings=settings)
config.add_static_view('static', 'tutorial:static')
- config.add_route('home', '/', view='tutorial.views.view_wiki')
+ config.add_route('view_wiki', '/', view='tutorial.views.view_wiki')
config.add_route('view_page', '/{pagename}',
view='tutorial.views.view_page',
view_renderer='tutorial:templates/view.pt')
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/footerbg.png b/docs/tutorials/wiki2/src/views/tutorial/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/footerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/headerbg.png b/docs/tutorials/wiki2/src/views/tutorial/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/headerbg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/ie6.css b/docs/tutorials/wiki2/src/views/tutorial/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/logo.png b/docs/tutorials/wiki2/src/views/tutorial/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/tutorials/wiki2/src/views/tutorial/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/middlebg.png b/docs/tutorials/wiki2/src/views/tutorial/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/middlebg.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/pylons.css b/docs/tutorials/wiki2/src/views/tutorial/static/pylons.css
index c153be07f..fd1914d8d 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/static/pylons.css
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,26 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+.top-small{padding-top:10px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/pyramid-small.png b/docs/tutorials/wiki2/src/views/tutorial/static/pyramid-small.png
new file mode 100644
index 000000000..a5bc0ade7
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/pyramid-small.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/pyramid.png b/docs/tutorials/wiki2/src/views/tutorial/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/pyramid.png
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/style.css b/docs/tutorials/wiki2/src/views/tutorial/static/style.css
deleted file mode 100644
index cad87e0d4..000000000
--- a/docs/tutorials/wiki2/src/views/tutorial/static/style.css
+++ /dev/null
@@ -1,109 +0,0 @@
-html, body {
- color: black;
- background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
- margin: 0;
- padding: 0;
-}
-
-td, th {padding:3px;border:none;}
-tr th {text-align:left;background-color:#f0f0f0;color:#333;}
-tr.odd td {background-color:#edf3fe;}
-tr.even td {background-color:#fff;}
-
-#header {
- height: 80px;
- width: 777px;
- background: blue URL('../images/header_inner.png') no-repeat;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- margin: 0 auto 0 auto;
-}
-
-a.link, a, a.active {
- color: #369;
-}
-
-
-#main_content {
- color: black;
- font-size: 127%;
- background-color: white;
- width: 757px;
- margin: 0 auto 0 auto;
- border-left: 1px solid #aaa;
- border-right: 1px solid #aaa;
- padding: 10px;
-}
-
-#sidebar {
- border: 1px solid #aaa;
- background-color: #eee;
- margin: 0.5em;
- padding: 1em;
- float: right;
- width: 200px;
- font-size: 88%;
-}
-
-#sidebar h2 {
- margin-top: 0;
-}
-
-#sidebar ul {
- margin-left: 1.5em;
- padding-left: 0;
-}
-
-h1,h2,h3,h4,h5,h6,#getting_started_steps {
- font-family: "Century Schoolbook L", Georgia, serif;
- font-weight: bold;
-}
-
-h2 {
- font-size: 150%;
-}
-
-#footer {
- border: 1px solid #aaa;
- border-top: 0px none;
- color: #999;
- background-color: white;
- padding: 10px;
- font-size: 80%;
- text-align: center;
- width: 757px;
- margin: 0 auto 1em auto;
-}
-
-.code {
- font-family: monospace;
-}
-
-span.code {
- font-weight: bold;
- background: #eee;
-}
-
-#status_block {
- margin: 0 auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- background: #cec URL('../images/ok.png') left center no-repeat;
- border: 1px solid #9c9;
- width: 450px;
- font-size: 120%;
- font-weight: bolder;
-}
-
-.notice {
- margin: 0.5em auto 0.5em auto;
- padding: 15px 10px 15px 55px;
- width: 450px;
- background: #eef URL('../images/info.png') left center no-repeat;
- border: 1px solid #cce;
-}
-
-.fielderror {
- color: red;
- font-weight: bold;
-}
diff --git a/docs/tutorials/wiki2/src/views/tutorial/static/transparent.gif b/docs/tutorials/wiki2/src/views/tutorial/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/tutorials/wiki2/src/views/tutorial/static/transparent.gif
Binary files differ
diff --git a/docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt b/docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt
index 047a64eb3..f8f63af3b 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt
+++ b/docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt
@@ -1,32 +1,57 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.name} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
- <div style="float:right; width: 10em;"> Viewing
- <span tal:replace="page.name">Page Name Goes Here</span> <br/>
- You can return to the <a href="${request.application_url}"
- >FrontPage</a>.
- </div>
-
- <div>
- <form action="${save_url}" method="post">
- <textarea name="body" tal:content="page.data" rows="10" cols="60"/>
- <input type="submit" name="form.submitted" value="Save"/>
- </form>
- </div>
-</div>
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Editing <b><span tal:replace="page.name">Page Name Goes
+ Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right"></div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <form action="${save_url}" method="post">
+ <textarea name="body" tal:content="page.data" rows="10"
+ cols="60"/><br/>
+ <input type="submit" name="form.submitted" value="Save"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt b/docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt
index 6ad23d44f..e31a342b2 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt
+++ b/docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt
@@ -5,23 +5,22 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
- <link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
- <!--[if !IE 7]>
- <style type="text/css">
- #wrap {display:table;height:100%}
- </style>
+ <link rel="shortcut icon" href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.static_url('tutorial:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
<div id="top">
<div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
+ <div><img src="${request.static_url('tutorial:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
@@ -31,38 +30,35 @@
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
- <form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
+ <h2>Search documentation</h2>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/dev/search.html">
<input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
+ <input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
- <h3>Pyramid links</h3>
+ <h2>Pyramid links</h2>
<ul class="links">
<li>
- <a href="http://pylonshq.com">Pylons Website</a>
- </li>
- <li>
- <a href="http://docs.pylonshq.com/">The Pylons Project Documentation</a>
+ <a href="http://pylonsproject.org">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#api-documentation">API Documentation</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#tutorials">Tutorials</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#change-history">Change History</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#sample-applications">Sample Applications</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/dev/#support-and-development">Support and Development</a>
</li>
<li>
<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
@@ -73,7 +69,7 @@
</div>
</div>
<div id="footer">
- <div class="footer">© Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html> \ No newline at end of file
diff --git a/docs/tutorials/wiki2/src/views/tutorial/templates/view.pt b/docs/tutorials/wiki2/src/views/tutorial/templates/view.pt
index 86fcc914e..7c8a39f53 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/templates/view.pt
+++ b/docs/tutorials/wiki2/src/views/tutorial/templates/view.pt
@@ -1,28 +1,60 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <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" />
+ <title>${page.name} - Pyramid tutorial wiki (based on
+ TurboGears 20-Minute Wiki)</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <meta name="keywords" content="python web application" />
+ <meta name="description" content="pyramid web application" />
+ <link rel="shortcut icon"
+ href="${request.static_url('tutorial:static/favicon.ico')}" />
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/pylons.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <!--[if lte IE 6]>
+ <link rel="stylesheet"
+ href="${request.static_url('tutorial:static/ie6.css')}"
+ type="text/css" media="screen" charset="utf-8" />
+ <![endif]-->
</head>
-
<body>
-
-<div class="main_content">
-<div style="float:right; width: 10em;"> Viewing
-<span tal:replace="page.name">Page Name Goes Here</span> <br/>
-You can return to the <a href="${request.application_url}">FrontPage</a>.
-</div>
-
-<div tal:replace="structure content">Page text goes here.</div>
-<p><a tal:attributes="href edit_url" href="">Edit this page</a></p>
-</div>
-
+ <div id="wrap">
+ <div id="top-small">
+ <div class="top-small align-center">
+ <div>
+ <img width="220" height="50" alt="pyramid"
+ src="${request.static_url('tutorial:static/pyramid-small.png')}" />
+ </div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-right">
+ <div id="left" class="app-welcome align-left">
+ Viewing <b><span tal:replace="page.name">Page Name
+ Goes Here</span></b><br/>
+ You can return to the
+ <a href="${request.application_url}">FrontPage</a>.<br/>
+ </div>
+ <div id="right" class="app-welcome align-right"></div>
+ </div>
+ </div>
+ <div id="bottom">
+ <div class="bottom">
+ <div tal:replace="structure content">
+ Page text goes here.
+ </div>
+ <p>
+ <a tal:attributes="href edit_url" href="">
+ Edit this page
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="footer">© Copyright 2008-2011, Agendaless Consulting.</div>
+ </div>
</body>
</html>
diff --git a/docs/tutorials/wiki2/src/views/tutorial/tests.py b/docs/tutorials/wiki2/src/views/tutorial/tests.py
index 7b770f927..b9797df67 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/views/tutorial/tests.py
@@ -1,6 +1,5 @@
import unittest
-from pyramid.config import Configurator
from pyramid import testing
def _initTestingDB():
@@ -20,11 +19,10 @@ def _registerRoutes(config):
class ViewWikiTests(unittest.TestCase):
def setUp(self):
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
- self.config.end()
+ testing.tearDown()
def test_it(self):
from tutorial.views import view_wiki
@@ -36,12 +34,11 @@ class ViewWikiTests(unittest.TestCase):
class ViewPageTests(unittest.TestCase):
def setUp(self):
self.session = _initTestingDB()
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
self.session.remove()
- self.config.end()
+ testing.tearDown()
def _callFUT(self, request):
from tutorial.views import view_page
@@ -71,12 +68,12 @@ class ViewPageTests(unittest.TestCase):
class AddPageTests(unittest.TestCase):
def setUp(self):
self.session = _initTestingDB()
- self.config = Configurator(autocommit=True)
+ self.config = testing.setUp()
self.config.begin()
def tearDown(self):
self.session.remove()
- self.config.end()
+ testing.tearDown()
def _callFUT(self, request):
from tutorial.views import add_page
@@ -104,12 +101,11 @@ class AddPageTests(unittest.TestCase):
class EditPageTests(unittest.TestCase):
def setUp(self):
self.session = _initTestingDB()
- self.config = Configurator(autocommit=True)
- self.config.begin()
+ self.config = testing.setUp()
def tearDown(self):
self.session.remove()
- self.config.end()
+ testing.tearDown()
def _callFUT(self, request):
from tutorial.views import edit_page