[Checkins] SVN: Sandbox/darrylcousins/mars.view/s Egg ready

Darryl Cousins darryl at darrylcousins.net.nz
Fri Jul 13 05:16:35 EDT 2007


Log message for revision 77813:
  Egg ready

Changed:
  U   Sandbox/darrylcousins/mars.view/setup.py
  U   Sandbox/darrylcousins/mars.view/src/mars/view/README.txt

-=-
Modified: Sandbox/darrylcousins/mars.view/setup.py
===================================================================
--- Sandbox/darrylcousins/mars.view/setup.py	2007-07-13 09:14:08 UTC (rev 77812)
+++ Sandbox/darrylcousins/mars.view/setup.py	2007-07-13 09:16:35 UTC (rev 77813)
@@ -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 views.""",
+This package uses ``martian`` and ``grok`` to register layers and skin
+for applications built on the ``zope`` framework.""",
     long_description=(
         read('src/mars/view/README.txt')
         ),
@@ -26,71 +23,29 @@
     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.layer',
+                      'mars.template',
+        ]
+                ),
     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',
+        'z3c.pagelet',
         ],
 )
-        #              'zope.app.pagetemplate',
-        #              'zope.app.testing',
-        #              'zope.configuration',
-        #              'zope.dottedname',
-        #              'zope.event',
-        #              'zope.formlib',
-        #              'zope.lifecycleevent',
-        #              'zope.security',
-        #              'zope.testing',
-
-

Modified: Sandbox/darrylcousins/mars.view/src/mars/view/README.txt
===================================================================
--- Sandbox/darrylcousins/mars.view/src/mars/view/README.txt	2007-07-13 09:14:08 UTC (rev 77812)
+++ Sandbox/darrylcousins/mars.view/src/mars/view/README.txt	2007-07-13 09:16:35 UTC (rev 77813)
@@ -2,10 +2,22 @@
 Mars View
 =========
 
+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
+------------
+
 z3c packages bring significant clarity and a pattern for forms, view and
 templates.
 
@@ -21,6 +33,10 @@
 addition to a `render` method inherited from TemplateView which returns the
 rendered template.
 
+PageletView provides both a ``render`` method and a ``__call__`` method.
+
+FormView is useful with z3c.form (see mars.formdemo for examples).
+
 Example Code
 ------------
 
@@ -55,12 +71,50 @@
      grok.template('templates/snippet.pt')
      grok.context(View)
 
+Directives specific to this package
+-----------------------------------
 
-Directives
-----------
+* mars.view.layout(name):
+  If defined the layout for LayoutView will be looked up as a `named adapter`.
+  Should only be defined if the layout template has been registered as a named
+  adapter.
+  Default: ''
 
-Please see ``directive.txt``.
 
+The mars.layer directive may be used
+-----------------------------------------
+
+* mars.layer.layer(class_or_interface):
+  The layer for which the template should be available.
+  Default: zope.publisher.browser.interfaces.IDefaultBrowserLayer
+
+Relevant grok directives
+------------------------
+
+* grok.name(name):
+  Name of the view, available in url as object/@@viewname.
+  Default: factory.__name__.lower()
+
+* grok.context(class_or_interface):
+  The view for which the template should be available. Usually should be
+  defined.
+  Default: module context
+
+* grok.template(name):
+  If defined the template will be looked up as a `named adapter`. Should only be
+  defined if the template has been registered as a named adapter.
+  Default: ''
+
+* grok.require(permission):
+  Protect the view class with ``permission``.
+  ``permission`` must already be defined, e.g. using
+  grok.define_permission.
+  Default: []
+
+* grok.provides(class_or_interface):
+  Interface the class is looked up as, probably wouldn't be used.
+  Default: zope.interface.Interface
+
 Tests
 -----
 



More information about the Checkins mailing list