Changeset 3356 for WAeUP_SRP/base
- Timestamp:
- 19 Mar 2008, 16:20:34 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_default/waeup_edit.py
r3301 r3356 3 3 """ 4 4 """ 5 try: 6 from Products.zdb import set_trace 7 except: 8 def set_trace(): 9 pass 5 10 6 11 from urllib import urlencode … … 23 28 # url = context.absolute_url() + '?' + urlencode(args) 24 29 # return REQUEST.RESPONSE.redirect(url) 30 old_values = dict([(k,v) for k,v in doc.getDataModel().items()]) 25 31 26 32 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster, 27 33 use_session=True) 28 29 34 student_id = context.getStudentId() 30 31 35 action = "/" + came_from 32 36 if is_valid: 33 comments = REQUEST.get('comments') 34 context.cpsdocument_notify_modification(comments=comments) 35 36 37 37 # comments = REQUEST.get('comments') 38 # context.cpsdocument_notify_modification(comments=comments) 38 39 if cpsdocument_edit_and_view_button is not None: 39 40 action = '' 41 new_values = dict([(k,v) for k,v in doc.getDataModel().items()]) 42 changed = [ k for k in old_values.keys() if new_values[k] != old_values[k]] 43 logger.info('%s edited %s %s (%s) of %s' % (member, 44 context.portal_type, 45 context.id, 46 ','.join(changed), 47 student_id)) 40 48 psm = 'psm_content_changed' 41 49 args = {} … … 44 52 args = getFormUidUrlArg(REQUEST) 45 53 46 logger.info('%s edited %s %s of %s' % (member,context.portal_type,context.id,student_id))47 54 args['portal_status_message'] = psm 48 55 url = context.absolute_url() + action + '?' + urlencode(args)
Note: See TracChangeset for help on using the changeset viewer.