[Zope3-checkins] CVS: Products3/NewsSite - newssite.py:1.1 configure.zcml:1.2 interfaces.py:1.2

Axel Bringenberg A.Bringenberg@srz-berlin.de
Wed, 26 Mar 2003 05:48:23 -0500


Update of /cvs-repository/Products3/NewsSite
In directory cvs.zope.org:/tmp/cvs-serv20893

Modified Files:
	configure.zcml interfaces.py 
Added Files:
	newssite.py 
Log Message:
 - added newsite object with configuration and test


=== Added File Products3/NewsSite/newssite.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""News site base class

$Id: newssite.py,v 1.1 2003/03/26 10:47:53 bringi Exp $
"""
from zope.app.content.folder import Folder
from zopeproducts.NewsSite.interfaces import INewsSite

class NewsSite(Folder):
	"""XXX to be written"""

	__implements__ = (Folder.__implements__, INewsSite)

	


=== Products3/NewsSite/configure.zcml 1.1 => 1.2 ===
--- Products3/NewsSite/configure.zcml:1.1	Tue Mar 25 12:48:13 2003
+++ Products3/NewsSite/configure.zcml	Wed Mar 26 05:47:53 2003
@@ -2,7 +2,48 @@
     xmlns='http://namespaces.zope.org/zope'
     xmlns:browser='http://namespaces.zope.org/browser'
 >
+<!-- Configuration for News Site Object -->
+<content 
+	class=".newssite.NewsSite">
 
+	<factory
+		id="NewsSite"
+		permission="zope.ManageContent"
+		title="News site"
+		description="boring news site"/>
+
+  <allow
+      interface="zope.app.interfaces.services.service.Read"
+      />
+
+  <require
+      permission="zope.ManageServices"
+      interface="zope.app.interfaces.services.service.Write"
+      />
+
+  <require
+      permission="zope.View"
+      interface="zope.app.interfaces.container.IReadContainer"
+      />
+
+  <require
+      permission="zope.ManageContent"
+      interface="zope.app.interfaces.container.IWriteContainer"
+      />
+ 
+</content>
+
+<browser:menuItem
+	menu="add_content"
+	for="zope.app.interfaces.container.IAdding"
+	title="News site"
+	action="NewsSite"
+    description="A boring news site."
+/>
+	
+
+
+<!--
 <browser:addform
     name="register.html"
     schema=".interfaces.IMember"
@@ -16,6 +57,7 @@
     set_before_add="email realname"
     />
 
+-->
 <!--
   **
   **    How do we do this?  Should the view class just unwrap the user


=== Products3/NewsSite/interfaces.py 1.1 => 1.2 ===
--- Products3/NewsSite/interfaces.py:1.1	Tue Mar 25 11:28:00 2003
+++ Products3/NewsSite/interfaces.py	Wed Mar 26 05:47:53 2003
@@ -19,6 +19,8 @@
 from zope.interface import Interface
 from zope.schema import TextLine, Password
 
+class INewsSite(Interface):
+	"""Provides a marker interface for news site"""
 
 class IMember(Interface):
     """Provide information about site members.