[Zope-CVS] CVS: Packages/JobBoardEx - JobCreateView.py:1.4

Guido van Rossum guido@python.org
Mon, 17 Jun 2002 12:21:24 -0400


Update of /cvs-repository/Packages/JobBoardEx
In directory cvs.zope.org:/tmp/cvs-serv19047

Modified Files:
	JobCreateView.py 
Log Message:
Give the action method all four defined job attributes as arguments,
with blank defaults, so it is now a simple matter of editing page
templates to support the full Job data model (submitter, summary,
description, contact).


=== Packages/JobBoardEx/JobCreateView.py 1.3 => 1.4 ===
     form2 = ViewPageTemplateFile('JobPreviewView.pt')
 
-    def action(self, summary):
-        job = Job('', summary, '', '')
+    def action(self, submitter='', summary='', description='', contact=''):
+        # Validation code should go here
+        job = Job(submitter, summary, description, contact)
         self.context.add(job)
         self.request.getResponse().redirect('.')