[Checkins] SVN: z3c.template/trunk/ Added `zcml.txt` to ``long_description`` to show up on pypi.
Michael Howitz
mh at gocept.com
Sat Aug 22 07:51:36 EDT 2009
Log message for revision 103074:
Added `zcml.txt` to ``long_description`` to show up on pypi.
Changed:
U z3c.template/trunk/CHANGES.txt
U z3c.template/trunk/setup.py
U z3c.template/trunk/src/z3c/template/zcml.txt
-=-
Modified: z3c.template/trunk/CHANGES.txt
===================================================================
--- z3c.template/trunk/CHANGES.txt 2009-08-22 07:27:53 UTC (rev 103073)
+++ z3c.template/trunk/CHANGES.txt 2009-08-22 11:51:36 UTC (rev 103074)
@@ -7,6 +7,8 @@
* Corrected description of ``ITemplateDirective.name``.
+* Added `zcml.txt` to ``long_description`` to show up on pypi.
+
* Removed zpkg helper files and zcml slugs.
Modified: z3c.template/trunk/setup.py
===================================================================
--- z3c.template/trunk/setup.py 2009-08-22 07:27:53 UTC (rev 103073)
+++ z3c.template/trunk/setup.py 2009-08-22 11:51:36 UTC (rev 103074)
@@ -29,12 +29,11 @@
description = "A package implementing advanced Page Template patterns.",
long_description=(
read('README.txt')
- + '\n' +
- 'Detailed Documentation\n'
- '**********************\n'
- + '\n' +
+ + '\n\n.. contents::\n\n'+
read('src', 'z3c', 'template', 'README.txt')
+ '\n' +
+ read('src', 'z3c', 'template', 'zcml.txt')
+ + '\n' +
read('CHANGES.txt')
),
license = "ZPL 2.1",
Modified: z3c.template/trunk/src/z3c/template/zcml.txt
===================================================================
--- z3c.template/trunk/src/z3c/template/zcml.txt 2009-08-22 07:27:53 UTC (rev 103073)
+++ z3c.template/trunk/src/z3c/template/zcml.txt 2009-08-22 11:51:36 UTC (rev 103074)
@@ -2,7 +2,7 @@
Template directive
==================
-Show how we can use the template directive. Register the meta configuration for
+Show how we can use the template directive. Register the meta configuration for
the directive.
>>> import sys
@@ -12,7 +12,7 @@
PageTemplate
-~~~~~~~~~~~~
+------------
We need a custom content template
@@ -41,7 +41,7 @@
Make them available under the fake package ``custom``:
>>> sys.modules['custom'] = type(
- ... 'Module', (),
+ ... 'Module', (),
... {'IView': IView})()
and register them as a template within the ``z3c:template`` directive:
@@ -61,7 +61,7 @@
>>> import zope.component
>>> from z3c.template.interfaces import IContentTemplate
>>> template = zope.component.queryMultiAdapter(
- ... (view, request),
+ ... (view, request),
... interface=IContentTemplate)
and check them:
@@ -75,7 +75,7 @@
Layout template
-~~~~~~~~~~~~~~~
+---------------
Define a layout template
@@ -97,7 +97,7 @@
Let's get the template
>>> from z3c.template.interfaces import ILayoutTemplate
- >>> layout = zope.component.queryMultiAdapter((view, request),
+ >>> layout = zope.component.queryMultiAdapter((view, request),
... interface=ILayoutTemplate)
and check them:
@@ -110,7 +110,7 @@
Context-specific template
-~~~~~~~~~~~~~~~~~~~~~~~~~
+-------------------------
Most of views have some object as their context and it's ofter very
useful to be able register context-specific template. We can do that
@@ -147,7 +147,7 @@
>>> content = Content()
>>> view = View(content, request)
- >>> template = zope.component.queryMultiAdapter((view, request, content),
+ >>> template = zope.component.queryMultiAdapter((view, request, content),
... interface=IContentTemplate)
>>> print template(view)
@@ -168,7 +168,7 @@
... </configure>
... """ % file, context=context)
- >>> layout = zope.component.queryMultiAdapter((view, request, content),
+ >>> layout = zope.component.queryMultiAdapter((view, request, content),
... interface=ILayoutTemplate)
>>> print layout(view)
@@ -199,7 +199,7 @@
>>> from z3c.template.interfaces import ILayoutTemplate
>>> template = zope.component.queryMultiAdapter(
- ... (view, request),
+ ... (view, request),
... interface=IContentTemplate, name='edit')
>>> print template(view)
@@ -238,7 +238,7 @@
Let's see if we get the template by the new interface:
>>> from z3c.template.interfaces import ILayoutTemplate
- >>> template = zope.component.queryMultiAdapter((view, request),
+ >>> template = zope.component.queryMultiAdapter((view, request),
... interface=IMyTemplate,)
>>> print template(view)
More information about the Checkins
mailing list