[Checkins] SVN: Sandbox/darrylcousins/tfws.website/ Initial import of website demo/prototype

Darryl Cousins darryl at darrylcousins.net.nz
Sun Jul 22 19:34:38 EDT 2007


Log message for revision 78282:
  Initial import of website demo/prototype

Changed:
  A   Sandbox/darrylcousins/tfws.website/
  A   Sandbox/darrylcousins/tfws.website/buildout.cfg
  A   Sandbox/darrylcousins/tfws.website/deploy.ini
  A   Sandbox/darrylcousins/tfws.website/log/
  A   Sandbox/darrylcousins/tfws.website/log/README.txt
  A   Sandbox/darrylcousins/tfws.website/setup.py
  A   Sandbox/darrylcousins/tfws.website/site.zcml
  A   Sandbox/darrylcousins/tfws.website/src/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/__init__.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/BROWSER.txt
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/README.txt
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/__init__.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/application.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/authentication.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/__init__.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/browser.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/index.pt
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/configure.zcml
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/ftesting.zcml
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/__init__.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/test_functional.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/i18n.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/interfaces.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/layer.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/security.zcml
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/site.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/__init__.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/images/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/skin.py
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/template.pt
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/website.css
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/templates/
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/templates/index.pt
  A   Sandbox/darrylcousins/tfws.website/src/tfws/website/testing.py
  A   Sandbox/darrylcousins/tfws.website/var/
  A   Sandbox/darrylcousins/tfws.website/var/README.txt
  A   Sandbox/darrylcousins/tfws.website/zope.conf

-=-
Added: Sandbox/darrylcousins/tfws.website/buildout.cfg
===================================================================
--- Sandbox/darrylcousins/tfws.website/buildout.cfg	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/buildout.cfg	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,22 @@
+[buildout]
+develop = . z3c.authentication z3c.resource
+parts = app test
+find-links = http://download.zope.org/distribution/
+eggs-directory = /opt/buildout/eggs
+newest = false
+
+[app]
+recipe = zc.recipe.egg
+eggs = tfws.website
+       Paste
+       PasteScript
+       PasteDeploy
+       z3c.authentication
+       z3c.resource
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = tfws.website
+       z3c.authentication
+       z3c.resource
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Added: Sandbox/darrylcousins/tfws.website/deploy.ini
===================================================================
--- Sandbox/darrylcousins/tfws.website/deploy.ini	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/deploy.ini	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,7 @@
+[app:main]
+use = egg:tfws.website
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080

Added: Sandbox/darrylcousins/tfws.website/log/README.txt
===================================================================
--- Sandbox/darrylcousins/tfws.website/log/README.txt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/log/README.txt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1 @@
+This directory contains logs such as the event log.


Property changes on: Sandbox/darrylcousins/tfws.website/log/README.txt
___________________________________________________________________
Name: svn:keywords
   + Date Author

Added: Sandbox/darrylcousins/tfws.website/setup.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/setup.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/setup.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,56 @@
+from setuptools import setup, find_packages
+
+version = '0.0'
+
+setup(name='tfws.website',
+      version=version,
+      description="",
+      long_description="""\
+""",
+      # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=[], 
+      keywords="",
+      author="",
+      author_email="",
+      url="",
+      license="",
+      package_dir={'': 'src'},
+      packages=find_packages('src'),
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=['setuptools',
+                        'lxml',
+                        'grok',
+                        'zope.app.file',
+                        'z3c.etestbrowser',
+                        'z3c.breadcrumb',
+                        'z3c.configurator',
+                        'z3c.form',
+                        'z3c.form',
+                        'z3c.formui',
+                        'z3c.layer',
+                        'z3c.pagelet',
+                        'z3c.schema',
+                        'z3c.template',
+                        'z3c.testing',
+                        'z3c.viewlet',
+                        'z3c.zrtresource',
+                        'z3c.formdemo',
+                        'zc.resourcelibrary',
+                        'zc.table',
+                        'mars.adapter',
+                        'mars.contentprovider',
+                        'mars.form',
+                        'mars.layer',
+                        'mars.macro',
+                        'mars.resource',
+                        'mars.template',
+                        'mars.view',
+                        'mars.viewlet',
+                        # Add extra requirements here
+                        ],
+      entry_points="""
+      [paste.app_factory]
+      main = tfws.website.application:application_factory
+      """,
+      )


Property changes on: Sandbox/darrylcousins/tfws.website/setup.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/site.zcml
===================================================================
--- Sandbox/darrylcousins/tfws.website/site.zcml	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/site.zcml	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,36 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           i18n_domain="tfws.website">
+
+  <include package="tfws.website" />
+
+  <securityPolicy 
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <unauthenticatedPrincipal id="zope.anybody"
+                            title="Unauthenticated User" />
+  <unauthenticatedGroup id="zope.Anybody"
+                        title="Unauthenticated Users" />
+  <authenticatedGroup id="zope.Authenticated"
+                      title="Authenticated Users" />
+  <everybodyGroup id="zope.Everybody"
+                  title="All Users" />
+  <principal id="zope.manager"
+             title="Manager"
+             login="tfws"
+             password_manager="Plain Text"
+             password="tfws"
+             />
+
+  <!-- Replace the following directive if you don't want public access -->
+  <grant permission="zope.View"
+         principal="zope.Anybody" />
+  <grant permission="zope.app.dublincore.view"
+         principal="zope.Anybody" />
+  
+  <role id="zope.Manager" title="Site Manager" />
+  <role id="zope.Member" title="Site Member" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager"
+         principal="zope.manager" />
+
+</configure>

Added: Sandbox/darrylcousins/tfws.website/src/tfws/__init__.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/__init__.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/__init__.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,7 @@
+try:
+    # Declare this a namespace package if pkg_resources is available.
+    import pkg_resources
+    pkg_resources.declare_namespace('tfws')
+except ImportError:
+    pass
+


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/BROWSER.txt
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/BROWSER.txt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/BROWSER.txt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,35 @@
+============
+tfws.website
+============
+
+  >>> from tfws.website import testing
+  >>> from z3c.etestbrowser.testing import ExtendedTestBrowser
+  >>> browser = ExtendedTestBrowser()
+  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+  >>> browser.handleErrors = False
+  >>> browser.open("http://localhost/")
+
+If we try to access the root object without credentials we get ``unauthorized``.
+
+  >>> user = ExtendedTestBrowser()
+  >>> user.open("http://localhost/")
+  Traceback (most recent call last):
+  ...
+  HTTPError: HTTP Error 401: Unauthorized
+
+Using our authenticated browser instance we can add a website.
+
+  >>> browser.open("http://localhost/add")
+  >>> browser.getControl('name').value = u'treefern'
+  >>> browser.getControl('Login').value = u'darrylcousins'
+  >>> browser.getControl('Password').value = u'tfws'
+  >>> browser.getControl('First Name').value = u'Darryl'
+  >>> browser.getControl('Last Name').value = u'Cousins'
+  >>> browser.getControl('Email').value = u'darry.cousins at tfws.org.nz'
+  >>> browser.getControl('Add').click()
+
+We can now access the new site with our user.
+
+  >>> user.handleErrors = False
+  >>> browser.open("http://localhost/treefern")
+  >>> print browser.contents


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/BROWSER.txt
___________________________________________________________________
Name: svn:keywords
   + Date Author

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/README.txt
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/README.txt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/README.txt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,15 @@
+============
+tfws.website
+============
+
+This website application borrows heavily from z3c.website and other z3c
+packages. It is however in essence a `Grok`_ application and uses most or all
+of the `Mars`_ packages for component definitions and registration.
+
+Although the intention is to use it also in production the focus of development
+is to produce a demo application for the `Mars`_ packages. It is the second demo
+application, the first being `mars.formdemo`_.
+
+.. _`Grok`: http://grok.zope.org/
+.. _`Mars`: http://www.tfws.org.nz/mars
+.. _`mars.formdemo`: http://svn.zope.org/Sandbox/darrylcousins/mars.formdemo


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/README.txt
___________________________________________________________________
Name: svn:keywords
   + Date Author

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/__init__.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/__init__.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/__init__.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1 @@
+# this directory is a package


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/application.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/application.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/application.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,32 @@
+import sys, os
+import ZConfig
+import zope.event
+import zope.app.appsetup
+from zope.app.wsgi import WSGIPublisherApplication
+from zope.app.appsetup.appsetup import multi_database
+from zope.app.appsetup.interfaces import DatabaseOpened, ProcessStarting
+
+def application_factory(global_conf, conf='zope.conf'):
+    # load 'zope.conf' configuration
+    schema_xml = os.path.join(
+        os.path.dirname(zope.app.appsetup.__file__), 'schema', 'schema.xml')
+    schema = ZConfig.loadSchema(schema_xml)
+    options, handlers = ZConfig.loadConfig(
+        schema, os.path.join(global_conf['here'], conf))
+
+    if options.path:
+        sys.path[0:0] = [os.path.abspath(p) for p in options.path]
+    options.eventlog()
+
+    # load ZCML configuration
+    features = ()
+    if options.devmode:
+        features += ('devmode',)
+    zope.app.appsetup.config(options.site_definition, features)
+
+    # notify of ZODB database opening
+    db = multi_database(options.databases)[0][0]
+    zope.event.notify(DatabaseOpened(db))
+
+    zope.event.notify(ProcessStarting())
+    return WSGIPublisherApplication(db)


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/application.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/authentication.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/authentication.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/authentication.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,26 @@
+import zope.interface
+from zope.schema.fieldproperty import FieldProperty
+
+from z3c.authentication.simple import member
+
+from tfws.website import interfaces
+
+class WebSiteMember(member.Member):
+    """An IMember for MemberContainer."""
+
+    zope.interface.implements(interfaces.IWebSiteMember)
+
+    firstName = FieldProperty(interfaces.IWebSiteMember['firstName'])
+    lastName = FieldProperty(interfaces.IWebSiteMember['lastName'])
+    email = FieldProperty(interfaces.IWebSiteMember['email'])
+
+    def __init__(self, login, password, firstName, lastName, email):
+        title = firstName +' '+ lastName
+        super(WebSiteMember, self).__init__(login, password, title)
+        self.firstName = firstName
+        self.lastName = lastName
+        self.email = email
+        self.description = email
+
+    def __repr__(self):
+        return '<%s %r>' %(self.__class__.__name__, self.title)


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/authentication.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/__init__.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/__init__.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/__init__.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1 @@
+#


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/browser.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/browser.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/browser.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,36 @@
+from zope.traversing.browser import absoluteURL
+from zope.app.folder.interfaces import IRootFolder
+
+import grok
+
+import mars.layer
+import mars.view
+import mars.template
+
+from tfws.website.layer import IWebsiteLayer
+
+mars.layer.layer(IWebsiteLayer)
+
+grok.define_permission('tfws.ManageSites')
+
+class Index(mars.view.PageletView):
+    grok.context(IRootFolder)
+    grok.require('tfws.ManageSites')
+
+    @property
+    def sites(self):
+        for site in self.context:
+            print site
+
+    @property
+    def addurl(self):
+        url = absoluteURL(self.context, self.request)
+        return url + '/add'
+
+
+class IndexTemplate(mars.template.TemplateFactory):
+    """layout template for `home`"""
+    grok.context(Index)
+    grok.template('index.pt') 
+    
+


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/browser.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/index.pt
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/index.pt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/browser/index.pt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,11 @@
+<h1>Tree Fern Web Site Demos</h1>
+
+<p>
+<a tal:attributes="href view/addurl" title="Add website">Add website</a>
+</p>
+<ul>
+ <li tal:repeat="site view/sites">
+  <a tal:attributes="href site/url;title site/description|site/title"
+  tal:content="site/title">Site</a>
+ </li>
+</ul>

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/configure.zcml
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/configure.zcml	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/configure.zcml	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,47 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:grok="http://namespaces.zope.org/grok"
+           xmlns:browser="http://namespaces.zope.org/browser">
+
+
+  <include package="grok" />
+
+  <!-- extra package includes, check grok configure first -->
+  <include package="zope.contentprovider" />
+
+  <include package="zope.viewlet" file="meta.zcml" />
+
+  <include package="z3c.form" file="meta.zcml" />
+  <include package="z3c.macro" file="meta.zcml" />
+  <include package="z3c.pagelet" file="meta.zcml" />
+  <include package="z3c.template" file="meta.zcml" />
+  <include package="z3c.zrtresource" file="meta.zcml" />
+  <include package="zc.resourcelibrary" file="meta.zcml" />
+
+  <include package="z3c.form" />
+  <include package="z3c.formui" />
+  <include package="z3c.layer.pagelet" />
+  <include package="z3c.macro" />
+  <include package="z3c.pagelet" />
+  <include package="z3c.authentication.simple" />
+
+  <include package="zc.resourcelibrary" />
+  <include package="zc.table" />
+
+  <include package="mars.layer" file="meta.zcml" />
+  <include package="mars.template" file="meta.zcml" />
+  <include package="mars.view" file="meta.zcml" />
+  <include package="mars.viewlet" file="meta.zcml" />
+  <include package="mars.resource" file="meta.zcml" />
+  <include package="mars.macro" file="meta.zcml" />
+  <include package="mars.contentprovider" file="meta.zcml" />
+  <include package="mars.adapter" file="meta.zcml" />
+  <include package="mars.form" file="meta.zcml" />
+
+  <include file="security.zcml" />
+<!-- grok the package for components and registrations -->
+  <grok:grok package="." />
+
+  <browser:defaultView name="index" />
+  <browser:defaultSkin name="tfwswebsite" />
+
+</configure>

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/ftesting.zcml
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/ftesting.zcml	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/ftesting.zcml	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,34 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   i18n_domain="tfws.website"
+   package="tfws.website"
+   >
+
+  <include package="tfws.website" />
+
+  <!-- Typical functional testing security setup -->
+  <securityPolicy
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy"
+      />
+
+  <unauthenticatedPrincipal
+      id="zope.anybody"
+      title="Unauthenticated User"
+      />
+  <grant
+      permission="zope.View"
+      principal="zope.anybody"
+      />
+
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw"
+      />
+
+  <role id="zope.Manager" title="Site Manager" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager" principal="zope.mgr" />
+
+</configure>

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/__init__.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/__init__.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/__init__.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1 @@
+#


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/test_functional.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/test_functional.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/test_functional.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,28 @@
+import unittest
+from zope.testing import doctest
+from zope.app.testing import setup
+
+from zope.app.testing.functional import FunctionalTestSetup, getRootFolder
+
+from tfws.website import testing
+
+optionflags = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS
+globs = dict(getRootFolder=getRootFolder)
+
+def setUp(test):
+    FunctionalTestSetup().setUp()
+
+def tearDown(test):
+    FunctionalTestSetup().tearDown()
+
+def test_suite():
+    suite = unittest.TestSuite()
+    test = doctest.DocFileSuite(
+                '../BROWSER.txt', setUp=setUp, globs=globs,
+                tearDown=tearDown, optionflags=optionflags)
+    test.layer = testing.TestLayer
+    suite.addTest(test)
+    return suite
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/ftests/test_functional.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/i18n.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/i18n.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/i18n.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,4 @@
+import zope.i18nmessageid
+
+MessageFactory = zope.i18nmessageid.MessageFactory('tfws.website')
+


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/i18n.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/interfaces.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/interfaces.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/interfaces.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,166 @@
+import zope.interface
+import zope.schema
+from zope.annotation.interfaces import IAttributeAnnotatable
+from zope.app.container.interfaces import IContainer
+from zope.app.container.constraints import containers
+from zope.app.container.constraints import contains
+from zope.app.component.interfaces import IPossibleSite
+from zope.app.file.interfaces import IFile as ZIFile
+from zope.app.file.interfaces import IImage as ZIImage
+from zope.app.session.interfaces import ISession
+import z3c.schema.email
+import z3c.pagelet.interfaces
+import z3c.form.interfaces
+from z3c.authentication.simple.interfaces import IMember
+from z3c.resource.interfaces import IResourceTraversable
+from z3c.resource.interfaces import IResourceItem
+
+from tfws.website.i18n import MessageFactory as _
+
+
+#class IContent(IResourceTraversable): # grok traversal enough for me?
+class IContent(zope.interface.Interface):
+    """Page interface."""
+
+    title = zope.schema.TextLine(
+        title=_(u'Title'),
+        description=_(u'Title of the html page.'),
+        default=u'',
+        required=False)
+
+    description = zope.schema.Text(
+        title=_(u'Description'),
+        description=_(u'Description of the content.'),
+        default=u'',
+        required=False)
+
+    keyword = zope.schema.Text(
+        title=_(u'Keyword'),
+        description=_(u'Keyword of the content.'),
+        default=u'',
+        required=False)
+
+    body = zope.schema.Text(
+        title=_(u'Body'),
+        description=_(u'Body is the main part of the page.'),
+        default=u'',
+        required=False)
+
+
+class IWebSite(IContent):
+    """grok/mars demo site."""
+
+    containers('zope.app.folder.interfaces.IFolder')
+    contains('tfws.website.interfaces.IPage')
+
+    title = zope.schema.TextLine(
+        title=_(u'Title'),
+        description=_(u'The title of the site.'),
+        default=u"Grok/Mars/Z3C Demo Site",
+        required=True)
+
+
+class IPage(IContainer, IContent):
+    """Page interface."""
+
+    containers('tfws.website.interfaces.IWebSite', 
+               'tfws.website.interfaces.IPage')
+    contains('tfws.website.interfaces.IPage')
+
+
+class ISamples(IPage):
+    """Container for samples"""
+
+    containers(IWebSite)
+    contains('z3c.website.interfaces.ISample')
+
+    title = zope.schema.TextLine(
+        title=_("Title"),
+        description=_("The application title."),
+        required=True)
+
+
+class ISample(IContent):
+    """Base class for Z3C sample objects."""
+
+    containers(ISamples)
+
+    headline = zope.schema.TextLine(
+        title=_(u'Headline'),
+        description=_(u'The headline for the sample.'),
+        default=u'',
+        required=False)
+
+    summary = zope.schema.Text(
+        title=_(u'Summary'),
+        description=_(u'The sumary for the sample.'),
+        default=u'',
+        required=False)
+
+    author = zope.schema.TextLine(
+        title=_(u'Author'),
+        description=_(u'The author of the sample.'),
+        default=u'',
+        required=False)
+
+
+class ISamplePagelet(z3c.pagelet.interfaces.IPagelet):
+    """Sample pagelet using a special IPageletRenderer which includes intro and 
+    footer templates."""
+
+
+class ISampleAddForm(z3c.form.interfaces.IAddForm, 
+    z3c.pagelet.interfaces.IPagelet):
+    """Sample pagelet using a special IPageletRenderer whic includes intro and 
+    footer templates."""
+
+
+class ISessionData(zope.interface.Interface):
+    """Simple data object which offers a field called content."""
+
+    content = zope.schema.Text(
+        title=u'Content',
+        description=u'The content field',
+        default=u'')
+
+
+class IDemoSession(ISession):
+    """Simply session which knows how to set and get a object."""
+
+    def setObject(key, obj):
+        """Add a object to the session."""
+
+    def getObject(key, default=None):
+        """Get a object from the session."""
+
+
+class IFile(IResourceItem, ZIFile):
+    """File resource item."""
+
+
+class IImage(IResourceItem, ZIImage):
+    """Image resource item."""
+
+
+class IWebSiteMember(IMember):
+    """WebSite member."""
+
+    lastName = zope.schema.TextLine(
+        title=_(u'Last Name'),
+        description=_(u'The last name of the administrator.'),
+        default=u'',
+        missing_value=u'',
+        required=True)
+
+    firstName = zope.schema.TextLine(
+        title=_(u'First Name'),
+        description=_(u'The first name of the administrator.'),
+        default=u'',
+        missing_value=u'',
+        required=True)
+
+    email = z3c.schema.email.field.RFC822MailAddress(
+        title=_(u'Email'),
+        description=_(u'The email address of the administrator.'),
+        required=True)
+


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/interfaces.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/layer.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/layer.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/layer.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,4 @@
+import mars.form
+
+class IWebsiteLayer(mars.form.IDivFormLayer):
+    pass


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/layer.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/security.zcml
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/security.zcml	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/security.zcml	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,70 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope">
+
+  <!-- permissions -->
+  <permission
+      id="tfws.website.ManageContent"
+      title="Manage Content"
+      description="Allows to edit content."
+      />
+
+  <permission
+      id="tfws.website.ViewSite"
+      title="View Site"
+      description="View site."
+      />
+
+  <permission
+      id="tfws.website.ManageSite"
+      title="Manage Site"
+      description="Allows to edit site components."
+      />
+
+  <permission
+      id="tfws.website.ManageUsers"
+      title="Manage Users"
+      description="Allows to manage all users."
+      />
+
+
+  <!-- Administrator role -->
+  <role
+      id="tfws.website.Administrator"
+      title="WebSite Administrator"
+      description="Administrators can manage the site and tests"
+      />
+
+  <grant
+      permission="tfws.website.ManageContent"
+      role="tfws.website.Administrator"
+      />
+
+  <grant
+      permission="tfws.website.ViewSite"
+      role="tfws.website.Administrator"
+      />
+
+  <grant
+      permission="tfws.website.ManageSite"
+      role="tfws.website.Administrator"
+      />
+
+  <grant
+      permission="tfws.website.ManageUsers"
+      role="tfws.website.Administrator"
+      />
+
+
+  <!-- Member role -->
+  <role
+      id="tfws.website.Member"
+      title="WebSite Member"
+      description="Member can edit content"
+      />
+
+  <grant
+      permission="tfws.website.ManageContent"
+      role="tfws.website.Member"
+      />
+
+</configure>

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/site.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/site.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/site.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,186 @@
+import zope.component
+import zope.interface
+import zope.schema
+import zope.event
+import zope.lifecycleevent
+from zope.schema.fieldproperty import FieldProperty
+from zope.traversing.browser import absoluteURL
+from zope.app.intid import IntIds
+from zope.app.intid.interfaces import IIntIds
+from zope.app.catalog.catalog import Catalog
+from zope.app.catalog.interfaces import ICatalog
+from zope.app.folder.interfaces import IRootFolder
+from zope.app.authentication.session import SessionCredentialsPlugin
+from zope.app.security.interfaces import IAuthentication
+from zope.app.securitypolicy.interfaces import IPrincipalRoleManager
+
+from z3c.authentication.simple.authentication import SimpleAuthentication
+from z3c.authentication.simple.group import Group
+from z3c.authentication.simple.group import GroupContainer
+from z3c.authentication.simple.member import Member
+from z3c.authentication.simple.member import MemberContainer
+from z3c.authentication.simple.interfaces import IAuthenticatedPrincipal
+from z3c.authentication.simple.interfaces import IFoundPrincipal
+from z3c.authentication.simple.principal import PrincipalBase
+
+from z3c.configurator import configurator
+from z3c.form import form, field, button
+from z3c.formui import layout
+
+import grok
+
+import mars.layer
+import mars.template
+import mars.view
+import mars.form
+
+from tfws.website import interfaces
+from tfws.website import authentication
+from tfws.website.layer import IWebsiteLayer
+from tfws.website.i18n import MessageFactory as _
+
+mars.layer.layer(IWebsiteLayer)
+
+class WebSite(grok.Application, grok.Container):
+    """Mars/Grok/Z3C demo website"""
+    zope.interface.implements(interfaces.IWebSite)
+
+    title = FieldProperty(interfaces.IWebSite['title'])
+    description = FieldProperty(interfaces.IWebSite['description'])
+    keyword = FieldProperty(interfaces.IWebSite['keyword'])
+    body = FieldProperty(interfaces.IWebSite['body'])
+
+    def __init__(self, title=None):
+        super(WebSite, self).__init__()
+        if title is not None:
+            self.title = title
+
+    def __repr__(self):
+        return '<%s %r>' % (self.__class__.__name__, self.__name__)
+
+class Index(mars.form.FormView, layout.FormLayoutSupport, form.DisplayForm):
+    """Temp display view for site"""
+    fields = field.Fields(interfaces.IWebSite).omit('__parent__', 'title')
+
+class IndexTemplate(mars.template.TemplateFactory):
+    grok.context(Index)
+    grok.template('templates/index.pt')
+
+class Edit(mars.form.FormView, layout.FormLayoutSupport, form.EditForm):
+    """Edit form for site"""
+    grok.name('edit')
+    form.extends(form.EditForm)
+    label = u'Tree Fern Web Site Edit Form'
+    fields = field.Fields(interfaces.IWebSite).omit('__parent__')
+
+    @button.buttonAndHandler(u'Apply and View', name='applyView')
+    def handleApplyView(self, action):
+        self.handleApply(self, action)
+        if not self.widgets.errors:
+            url = absoluteURL(self.context, self.request)
+            self.request.response.redirect(url)
+
+class Add(mars.form.FormView, layout.AddFormLayoutSupport, form.AddForm):
+    """ Add form for tfws.website."""
+    grok.name('add')
+    grok.context(IRootFolder)
+    grok.local_utility(IntIds, IIntIds) # needed for the catalog
+    grok.local_utility(Catalog, ICatalog, setup=setup_catalog)
+
+    label = _('Add a Tree Fern WebSite')
+    contentName = None
+    data = None
+
+    fields = field.Fields(zope.schema.TextLine(
+                                __name__='__name__',
+                                title=_(u"name"),
+                                required=True))
+
+    fields += field.Fields(interfaces.IWebSite).select('title')
+    fields += field.Fields(interfaces.IWebSiteMember, prefix="member").select(
+        'member.login', 'member.password', 'member.firstName', 
+        'member.lastName', 'member.email')
+
+    def create(self, data):
+        self.data = data
+        # get form data
+        title = data.get('title', u'')
+        self.contentName = data.get('__name__', u'')
+
+        # Create site
+        return WebSite(title)
+
+    def add(self, obj):
+        data = self.data
+        # Add the site
+        if self.context.get(self.contentName) is not None:
+            self.status = _('Site with name already exist.')
+            self._finished_add = False
+            return None
+        self.context[self.contentName] = obj
+
+        # Configure the new site
+        configurator.configure(obj, data)
+
+        self._finished_add = True
+        return obj
+
+    def nextURL(self):
+        return self.request.URL[-1]
+
+class SiteConfigurator(grok.Adapter, configurator.ConfigurationPluginBase):
+    """Configure the site."""
+    zope.component.adapts(interfaces.IWebSite)
+
+    def __call__(self, data):
+        # get parameters
+    
+        # Add the pluggable authentication utility
+        sm = zope.component.getSiteManager(self.context)
+        auth = SimpleAuthentication()
+        zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(auth))
+        sm['auth'] = auth
+        sm.registerUtility(auth, IAuthentication)
+
+        # setup credentials plugin
+        cred = SessionCredentialsPlugin()
+        zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(cred))
+        auth[u'credentials'] = cred
+        auth.credentialsPlugins += (u'credentials',)
+
+        prm = IPrincipalRoleManager(self.context)
+
+        # setup 'members' member container
+        members = MemberContainer()
+        zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(members))
+        auth[u'members'] = members
+        auth.authenticatorPlugins += (u'members',)
+
+        # setup 'groups' group container
+        groups = GroupContainer(u'groups.')
+        zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(groups))
+        auth[u'groups'] = groups
+        auth.authenticatorPlugins += (u'groups',)
+
+        # setup 'Members' group
+        grp =  Group(u'Members', u'Members')
+        groups.addGroup('Members', grp) 
+        prm.assignRoleToPrincipal('tfws.website.Member', 'groups.Members')
+
+        # setup 'Administrators' group
+        grp =  Group(u'Administrators', u'Administrators')
+        groups.addGroup('Administrators', grp) 
+        prm.assignRoleToPrincipal('tfws.website.Administrator', 
+            'groups.Administrators')
+
+        # Add a Admin to the administrators group
+        login = data['member.login']
+        admin = authentication.WebSiteMember(login, data['member.password'], 
+            data['member.firstName'], data['member.lastName'], 
+            data['member.email'])
+        zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(admin))
+        auth['members'].add(admin)
+
+        adminGroup = groups['groups.Administrators']
+        adminGroup.setPrincipals(
+            adminGroup.principals + (admin.__name__,), check=False)


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/site.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/__init__.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/__init__.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/__init__.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1 @@
+#


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/skin.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/skin.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/skin.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,54 @@
+import zope.interface
+from zope.viewlet.viewlet import CSSViewlet
+from zope.publisher.interfaces.browser import IBrowserPage
+
+import z3c.formui
+
+import grok
+
+import mars.layer
+import mars.template
+import mars.viewlet
+import mars.resource
+
+from tfws.website.layer import IWebsiteLayer
+
+# module level layer definition
+mars.layer.layer(IWebsiteLayer)
+
+class TFWSWebsite(mars.layer.Skin):
+    """The ``tfwswebsite`` browser skin."""
+    pass
+
+class Template(mars.template.LayoutFactory):
+    """main template for pages (note the context!)"""
+    grok.context(IBrowserPage)
+    grok.template('template.pt')
+
+class CSSManager(mars.viewlet.ViewletManager):
+    """css viewletmanager"""
+    zope.interface.implements(z3c.formui.interfaces.ICSS)
+    grok.name('ICSS')
+    grok.context(zope.interface.Interface)
+
+class JavaScriptManager(mars.viewlet.ViewletManager):
+    """javascript viewletmanager"""
+    grok.name('IJavaScript')
+    grok.context(zope.interface.Interface)
+
+WebsiteCSSViewlet = CSSViewlet('website.css')
+class FormDemoCSSViewlet(mars.viewlet.SimpleViewlet, WebsiteCSSViewlet):
+    """css viewlet"""
+    grok.name('website.css')
+    grok.context(zope.interface.Interface)
+    mars.viewlet.manager(CSSManager)
+
+class DemoStyle(mars.resource.ResourceFactory):
+    """resources (++resource++website.css)"""
+    grok.name('website.css')
+    mars.resource.file('website.css')
+
+class Images(mars.resource.ResourceDirectoryFactory):
+    """image resource directory (++resource++images)"""
+    mars.resource.directory('images')
+


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/skin.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/template.pt
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/template.pt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/template.pt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,26 @@
+<!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" xml:lang="en" lang="en"
+      i18n:domain="tfws.website">
+<head>
+<title>Tree Fern Website Demo</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="pragma" content="no-cache" />
+<script type="text/javascript"
+    tal:define="contexturl context/@@absolute_url; 
+                viewurl request/URL"
+    tal:content="string:
+	var contextURL = '${contexturl}';
+	var viewURL = '${viewurl}';"> 
+</script>
+<script tal:replace="structure provider:IJavaScript"> </script>
+<style tal:replace="structure provider:ICSS"> 
+</style>
+</head>
+<body>
+<div id="content">
+  <tal:block replace="structure provider:pagelet" />
+</div>
+</body>
+</html>
+

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/website.css
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/website.css	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/skin/website.css	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,86 @@
+/* zrt-replace: "./images" tal"string:${context/++resource++images}" */
+
+body {
+    font: 11px Verdana, Helvetica, Arial, sans-serif;
+    margin: 0px;
+    padding: 0px;
+}
+
+/* [ html ]---------------------------------------------------------------- */
+
+form {
+    margin: 0px;
+    padding: 0px;
+}
+
+img {
+    border: 0;
+}
+
+a {
+    color: #D91813;
+    text-decoration: none;
+}
+
+a:link {
+    color: #D91813;
+    text-decoration: none;
+}
+
+a:visited {
+    color: #A68E8E;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #8C100D;
+}
+
+fieldset {
+    padding: 5px;
+}
+
+
+h1, h2, h3, h4, h5, h6 {
+    color: Black;
+    clear: left;
+    font: 100% bold Verdana, Helvetica, Arial, sans-serif;
+    margin: 0;
+    padding-top: 0.5em;
+}
+
+h1 {
+    font-size: 160%;
+}
+
+h2 {
+    font-size: 140%;
+}
+
+h3 {
+    height: 20px;
+    font-size: 120%;
+    background-color: #DDDCD0;
+    padding: 2px 0px 0px 5px;
+}
+
+h4 {
+    color: #777777;
+    font-size: 100%;
+    font-weight: bold;
+}
+
+h5 {
+    font-size: 90%;
+}
+
+h6 {
+    font-size: 80%;
+}
+
+
+/* ---[ website layout tags ]--------------------------------------------------- */
+
+#content {
+    padding: 20px;
+}

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/templates/index.pt
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/templates/index.pt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/templates/index.pt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,21 @@
+<h1 tal:content="context/title">Tree Fern</h1>
+
+        <tal:block repeat="widget view/widgets/values">
+          <div id="" class="row"
+               tal:attributes="id string:${widget/id}-row"
+               tal:condition="python:widget.mode != 'hidden'">
+            <metal:block define-macro="widget-row">
+              <div class="label">
+                <label tal:attributes="for widget/id">
+                  <span i18n:translate=""
+                      tal:content="widget/label">label</span>
+                  <span class="required"
+                        tal:condition="widget/required">*</span>
+                </label>
+              </div>
+              <div class="widget" tal:content="structure widget/render">
+                <input type="text" size="24" value="" />
+              </div>
+            </metal:block>
+          </div>
+        </tal:block>

Added: Sandbox/darrylcousins/tfws.website/src/tfws/website/testing.py
===================================================================
--- Sandbox/darrylcousins/tfws.website/src/tfws/website/testing.py	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/src/tfws/website/testing.py	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,19 @@
+import os.path
+import lxml.etree
+
+import tfws.website
+from zope.app.testing.functional import ZCMLLayer
+
+ftesting_zcml = os.path.join(
+    os.path.dirname(tfws.website.__file__), 'ftesting.zcml')
+TestLayer = ZCMLLayer(ftesting_zcml, __name__, 'FunctionalLayer')
+
+def printElement(browser, xpath, multiple=False, serialize=True):
+    result = [serialize and lxml.etree.tounicode(elem) or elem
+              for elem in browser.etree.xpath(xpath)]
+    if not multiple:
+        print result[0]
+        return
+    for elem in result:
+        print elem
+


Property changes on: Sandbox/darrylcousins/tfws.website/src/tfws/website/testing.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Sandbox/darrylcousins/tfws.website/var/README.txt
===================================================================
--- Sandbox/darrylcousins/tfws.website/var/README.txt	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/var/README.txt	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,3 @@
+This directory contains files for Zope's object database (ZODB)
+storage.  You can change where these files are stored by editing
+the paste.ini configuration file.


Property changes on: Sandbox/darrylcousins/tfws.website/var/README.txt
___________________________________________________________________
Name: svn:keywords
   + Date Author

Added: Sandbox/darrylcousins/tfws.website/zope.conf
===================================================================
--- Sandbox/darrylcousins/tfws.website/zope.conf	                        (rev 0)
+++ Sandbox/darrylcousins/tfws.website/zope.conf	2007-07-22 23:34:37 UTC (rev 78282)
@@ -0,0 +1,38 @@
+# Identify the component configuration used to define the site:
+site-definition site.zcml
+
+<zodb>
+  # Standard Filestorage
+  <filestorage>
+    path var/Data.fs
+  </filestorage>
+
+# Uncomment this if you want to connect to a ZEO server instead:
+#  <zeoclient>
+#    server localhost:8100
+#    storage 1
+#    # ZEO client cache, in bytes
+#    cache-size 20MB
+#    # Uncomment to have a persistent disk cache
+#    #client zeo1
+#  </zeoclient>
+</zodb>
+
+<eventlog>
+  # This sets up logging to both a file and to standard output
+  # (STDOUT).  The "path" setting can be a relative or absolute
+  # filesystem path or the tokens STDOUT or STDERR.
+
+  <logfile>
+    path log/z3.log
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+
+  <logfile>
+    path STDOUT
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+</eventlog>
+
+# Uncomment this to switch on developer mode (e.g. for APIDoc)
+devmode on



More information about the Checkins mailing list