[Zope3-checkins] CVS: zopeproducts/demo/jobboard - browser.py:1.2
configure.zcml:1.19 job.py:1.2
sree
sree at mahiti.org
Tue Dec 16 06:55:03 EST 2003
Update of /cvs-repository/zopeproducts/demo/jobboard
In directory cvs.zope.org:/tmp/cvs-serv29203
Modified Files:
browser.py configure.zcml job.py
Log Message:
=== zopeproducts/demo/jobboard/browser.py 1.1 => 1.2 ===
--- zopeproducts/demo/jobboard/browser.py:1.1 Tue Dec 16 04:40:48 2003
+++ zopeproducts/demo/jobboard/browser.py Tue Dec 16 06:55:01 2003
@@ -1,5 +1,9 @@
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.publisher.browser import BrowserView
+from zope.app.event import publish
+from zope.app.event.objectevent import ObjectCreatedEvent, ObjectModifiedEvent
+
+
from job import Job
class JobCreateView(BrowserView):
@@ -34,6 +38,7 @@
# Validation code should go here
job = Job(submitter, summary, description, contact)
self.context.add(job)
+ publish(self.context,ObjectModifiedEvent(self.context))
return self.thanks()
@@ -95,4 +100,5 @@
response.redirect('review.html')
else:
response.redirect('.')
+ publish(self.context,ObjectModifiedEvent(self.context))
=== zopeproducts/demo/jobboard/configure.zcml 1.18 => 1.19 ===
--- zopeproducts/demo/jobboard/configure.zcml:1.18 Tue Dec 16 04:46:36 2003
+++ zopeproducts/demo/jobboard/configure.zcml Tue Dec 16 06:55:01 2003
@@ -6,6 +6,8 @@
>
<content class="zopeproducts.demo.jobboard.job.JobList">
+ <implements interface="zope.app.interfaces.annotation.IAttributeAnnotatable"
+ />
<factory
id="zopeproducts.demo.jobboard.job.JobList"
title="I18n Job List"
=== zopeproducts/demo/jobboard/job.py 1.1 => 1.2 ===
--- zopeproducts/demo/jobboard/job.py:1.1 Tue Dec 16 04:40:48 2003
+++ zopeproducts/demo/jobboard/job.py Tue Dec 16 06:55:01 2003
@@ -7,6 +7,7 @@
from interfaces import IJob, JobState, IJobList
from zope.interface import implements
+
class Job(Persistent):
""" Job Class
@@ -23,7 +24,8 @@
"""
implements(IJob)
-
+
+
def __init__(self, submitter, summary, description,
contact, salary=None, startdate=None):
self.submitter = submitter
@@ -45,6 +47,8 @@
from persistence.dict import PersistentDict
+from zope.app.event import publish
+from zope.app.event.objectevent import ObjectCreatedEvent
class JobList(Persistent):
""" the Joblist class manages the creation, deletion of job list and
More information about the Zope3-Checkins
mailing list