comparison roundup/cgi_client.py @ 508:161d32dddd8a

missed a parsePropsFromForm in last update
author Richard Jones <richard@users.sourceforge.net>
date Thu, 10 Jan 2002 05:26:10 +0000
parents 883025274646
children f2edf460b0b9
comparison
equal deleted inserted replaced
507:883025274646 508:161d32dddd8a
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: cgi_client.py,v 1.95 2002-01-10 03:39:45 richard Exp $ 18 # $Id: cgi_client.py,v 1.96 2002-01-10 05:26:10 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 WWW request handler (also used in the stand-alone server). 21 WWW request handler (also used in the stand-alone server).
22 """ 22 """
23 23
398 398
399 def _createnode(self): 399 def _createnode(self):
400 ''' create a node based on the contents of the form 400 ''' create a node based on the contents of the form
401 ''' 401 '''
402 cl = self.db.classes[self.classname] 402 cl = self.db.classes[self.classname]
403 props, dummy = parsePropsFromForm(self.db, cl, self.form) 403 props = parsePropsFromForm(self.db, cl, self.form)
404 404
405 # set status to 'unread' if not specified - a status of '- no 405 # set status to 'unread' if not specified - a status of '- no
406 # selection -' doesn't make sense 406 # selection -' doesn't make sense
407 if not props.has_key('status'): 407 if not props.has_key('status'):
408 try: 408 try:
593 # possibly perform a create 593 # possibly perform a create
594 keys = self.form.keys() 594 keys = self.form.keys()
595 if [i for i in keys if i[0] != ':']: 595 if [i for i in keys if i[0] != ':']:
596 try: 596 try:
597 props = parsePropsFromForm(self.db, cl, self.form) 597 props = parsePropsFromForm(self.db, cl, self.form)
598 print props
599 nid = cl.create(**props) 598 nid = cl.create(**props)
600 # handle linked nodes 599 # handle linked nodes
601 self._post_editnode(nid) 600 self._post_editnode(nid)
602 # and some nice feedback for the user 601 # and some nice feedback for the user
603 message = _('%(classname)s created ok')%{'classname': cn} 602 message = _('%(classname)s created ok')%{'classname': cn}
1177 props[key] = value 1176 props[key] = value
1178 return props 1177 return props
1179 1178
1180 # 1179 #
1181 # $Log: not supported by cvs2svn $ 1180 # $Log: not supported by cvs2svn $
1181 # Revision 1.95 2002/01/10 03:39:45 richard
1182 # . fixed some problems with web editing and change detection
1183 #
1182 # Revision 1.94 2002/01/09 13:54:21 grubert 1184 # Revision 1.94 2002/01/09 13:54:21 grubert
1183 # _add_assignedto_to_nosy did set nosy to assignedto only, no adding. 1185 # _add_assignedto_to_nosy did set nosy to assignedto only, no adding.
1184 # 1186 #
1185 # Revision 1.93 2002/01/08 11:57:12 richard 1187 # Revision 1.93 2002/01/08 11:57:12 richard
1186 # crying out for real configuration handling... :( 1188 # crying out for real configuration handling... :(

Roundup Issue Tracker: http://roundup-tracker.org/