[Zope-CVS] SVN: zversioning/trunk/src/versioning/demo/ Basic
Proposal-Demo added
Volker Bachschneider
vbachs at dzug.org
Sun Oct 10 04:39:30 EDT 2004
Log message for revision 27878:
Basic Proposal-Demo added
Changed:
A zversioning/trunk/src/versioning/demo/configure.zcml
A zversioning/trunk/src/versioning/demo/interfaces.py
A zversioning/trunk/src/versioning/demo/vproposal.py
-=-
Added: zversioning/trunk/src/versioning/demo/configure.zcml
===================================================================
--- zversioning/trunk/src/versioning/demo/configure.zcml 2004-10-10 08:36:00 UTC (rev 27877)
+++ zversioning/trunk/src/versioning/demo/configure.zcml 2004-10-10 08:39:30 UTC (rev 27878)
@@ -0,0 +1,17 @@
+<configure
+ xmlns='http://namespaces.zope.org/zope'
+ xmlns:browser='http://namespaces.zope.org/browser'
+ i18n_domain="vproposal"
+ xmlns:i18n="http://namespaces.zope.org/i18n"
+ >
+
+<content class=".vproposal.VProposal">
+ <implements interface="zope.app.annotation.IAttributeAnnotatable"/>
+ <require permission="zope.View"
+ interface=".interfaces.IVProposal" />
+ <require permission="zope.ManageContent"
+ set_schema=".interfaces.IVProposal" />
+</content>
+
+
+</configure>
\ No newline at end of file
Added: zversioning/trunk/src/versioning/demo/interfaces.py
===================================================================
--- zversioning/trunk/src/versioning/demo/interfaces.py 2004-10-10 08:36:00 UTC (rev 27877)
+++ zversioning/trunk/src/versioning/demo/interfaces.py 2004-10-10 08:39:30 UTC (rev 27878)
@@ -0,0 +1,17 @@
+import zope.interface
+from zope.schema import Text, TextLine
+from zope.i18nmessageid import MessageIDFactory
+_ = MessageIDFactory("simplebug")
+
+
+class IVProposal(zope.interface.Interface):
+ """Provides access to a versionable Proposal"""
+
+ title = TextLine(title=_("Title"))
+ usecase = Text(title=_("Use Case"))
+ concept = Text(title=_("Concept"))
+ todo = Text(title=_("Todo"))
+ issues = Text(title=_("Open Issues"))
+
+ def proposal():
+ """return the Proposal"""
\ No newline at end of file
Added: zversioning/trunk/src/versioning/demo/vproposal.py
===================================================================
--- zversioning/trunk/src/versioning/demo/vproposal.py 2004-10-10 08:36:00 UTC (rev 27877)
+++ zversioning/trunk/src/versioning/demo/vproposal.py 2004-10-10 08:39:30 UTC (rev 27878)
@@ -0,0 +1,20 @@
+import persistent
+import zope.interface
+from zope.app.dublincore.interfaces import IZopeDublinCore
+from versioning.demo.interfaces import IVProposal
+
+class VProposal(persistent.Persistent):
+ """A versionable Proposal"""
+
+ zope.interface.implements(IVProposal)
+
+ def __init__(self,title='',usecase='',concept='',todo='',issues=''):
+ self.title = title
+ self.usecase = usecase
+ self.concept = concept
+ self.todo = todo
+ self.issues = issues
+
+ def proposal(self):
+ return "%s\n%s" % (self.title,self.usecase,self.concept,self.todo, \
+ self.issues)
\ No newline at end of file
More information about the Zope-CVS
mailing list