[Checkins] SVN: Sandbox/darrylcousins/mars.template/s Egg ready
Darryl Cousins
darryl at darrylcousins.net.nz
Fri Jul 13 05:16:50 EDT 2007
Log message for revision 77814:
Egg ready
Changed:
U Sandbox/darrylcousins/mars.template/setup.py
U Sandbox/darrylcousins/mars.template/src/mars/template/README.txt
-=-
Modified: Sandbox/darrylcousins/mars.template/setup.py
===================================================================
--- Sandbox/darrylcousins/mars.template/setup.py 2007-07-13 09:16:35 UTC (rev 77813)
+++ Sandbox/darrylcousins/mars.template/setup.py 2007-07-13 09:16:49 UTC (rev 77814)
@@ -11,11 +11,8 @@
author_email='darryl.cousins at tfws.org.nz',
url='http://www.tfws.org.nz/mars',
description="""\
-Martian is a library that allows the embedding of configuration
-information in Python code. Martian can then grok the system and
-do the appropriate configuration registrations.
-
-This package uses martian to register templates.""",
+This package uses ``martian`` and ``grok`` to register layers and skin
+for applications built on the ``zope`` framework.""",
long_description=(
read('src/mars/template/README.txt')
),
@@ -26,71 +23,27 @@
license='ZPL',
dependency_links = ['http://download.zope.org/distribution'],
extras_require = dict(
- test = ['zope.app.appsetup',
- 'zope.app.authentication',
- 'zope.app.component',
- 'zope.app.container',
- 'zope.app.error',
- 'zope.app.form',
- 'zope.app.publisher',
- 'zope.app.publication',
- 'zope.app.security',
- 'zope.app.securitypolicy',
- 'zope.app.twisted',
- 'zope.app.wsgi',
- 'zope.contentprovider',
- 'zope.app.intid',
- 'z3c.formdemo',
- 'z3c.etestbrowser',
- 'zope.app.zcmlfiles',
- 'zope.app.testing',
- 'mars.template'],
- ),
+ test=['zope.app.testing',
+ 'zope.testbrowser',
+ 'zope.app.zcmlfiles',
+ 'zope.app.securitypolicy',
+ 'zope.app.authentication',
+ 'z3c.pagelet',
+ 'mars.view',
+ ]
+ ),
install_requires = [
'setuptools',
- 'simplejson',
+ 'zope.app.intid',
+ 'zope.app.catalog',
+ 'zope.component',
+ 'zope.interface',
+ 'zope.publisher',
+ 'zope.pagetemplate',
'grok',
'martian',
- 'lxml',
- 'pytz',
- 'ZODB3',
- 'z3c.csvvocabulary',
'z3c.form',
- 'z3c.formui',
'z3c.layer',
- 'z3c.pagelet',
'z3c.template',
- 'z3c.viewlet',
- 'z3c.zrtresource',
- 'z3c.formdemo',
- 'zc.resourcelibrary',
- 'zc.table',
- 'zope.annotation',
- 'zope.contentprovider',
- 'zope.app.catalog',
- 'zope.app.folder',
- 'zope.app.container',
- 'zope.app.pagetemplate',
- 'zope.app.session',
- 'zope.component',
- 'zope.interface',
- 'zope.location',
- 'zope.pagetemplate',
- 'zope.publisher',
- 'zope.rdb',
- 'zope.schema',
- 'zope.traversing',
- 'zope.viewlet',
],
)
- # 'zope.app.pagetemplate',
- # 'zope.app.testing',
- # 'zope.configuration',
- # 'zope.dottedname',
- # 'zope.event',
- # 'zope.formlib',
- # 'zope.lifecycleevent',
- # 'zope.security',
- # 'zope.testing',
-
-
Modified: Sandbox/darrylcousins/mars.template/src/mars/template/README.txt
===================================================================
--- Sandbox/darrylcousins/mars.template/src/mars/template/README.txt 2007-07-13 09:16:35 UTC (rev 77813)
+++ Sandbox/darrylcousins/mars.template/src/mars/template/README.txt 2007-07-13 09:16:49 UTC (rev 77814)
@@ -2,15 +2,30 @@
Mars Template
=============
+Introduction
+------------
+
+`Grok`_ is a project which seeks to provide convention over configuration.
+
+``Martian`` grew from `Grok`_:
+
Martian is a library that allows the embedding of configuration
information in Python code. Martian can then grok the system and
do the appropriate configuration registrations.
+.. _Grok: http://grok.zope.org/
+
+Mars Template
+------------
+
+The mars.template package provides the means of creating and configuring
+``templates`` for an application using Zope3.
+
+These templates use presentation patterns used by other z3c packages.
+
z3c packages bring significant clarity and a pattern for forms, view and
templates.
-This package uses martian to configure z3c.template based templates.
-
Example Code
------------
@@ -28,13 +43,49 @@
grok.context(View)
mars.template.macro('mymacro')
-Directives
-----------
+Directives specific to this package
+-----------------------------------
-Please see ``directive.txt``.
+* mars.template.macro(name):
+ The macro to be used. This allows us to define different macros in on template.
+ The template designer can now create whole site, the ViewTemplate can then
+ extract the macros for single viewlets or views. If no macro is given the whole
+ template is used for rendering.
+ Default: empty
-Tests
------
+* mars.template.content_type(name):
+ The content type identifies the type of data.
+ Default: text/html
-See test directory.
+Also the mars.layer directive may be used
+-----------------------------------------
+* mars.layer.layer(class_or_interface):
+ The layer for which the template should be available.
+ This directive can be used at module level
+ Default: zope.publisher.browser.interfaces.IDefaultBrowserLayer
+
+Relevant grok directives
+------------------------
+
+* grok.template(path):
+ This is used different to IGrokDirectives.template. It looks up the file
+ containing the page template using the path relative to the current module, if
+ not found it tries `path` as an absolute path, if not found GrokError is
+ raised. The file should end in extensions ``.pt`` or ``.html``.
+ **Required**
+
+* grok.name(name):
+ If defined the template will be registered as a `named adapter`.
+ Default: empty string
+
+* grok.context(class_or_interface):
+ The view for which the template should be available. Usually should be
+ defined.
+ Default: module context
+
+* grok.provides(interface):
+ Explicitly specify with which interface a component will be looked up.
+ Default: zope.pagetemplate.interfaces.IPageTemplate for TemplateFactory
+ z3c.template.interfaces.ILayoutTemplate for LayoutFactory
+
More information about the Checkins
mailing list