comparison roundup/cgi/client.py @ 1521:709bb731e96e

remember the display template specified during edit [SF#701815]
author Richard Jones <richard@users.sourceforge.net>
date Mon, 17 Mar 2003 04:46:20 +0000
parents 9728e5c55633
children 1bb5e4dd12f3
comparison
equal deleted inserted replaced
1520:9728e5c55633 1521:709bb731e96e
1 # $Id: client.py,v 1.105 2003-03-17 04:26:24 richard Exp $ 1 # $Id: client.py,v 1.106 2003-03-17 04:46:20 richard Exp $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
840 self.set_cookie(self.user) 840 self.set_cookie(self.user)
841 841
842 # nice message 842 # nice message
843 message = _('You are now registered, welcome!') 843 message = _('You are now registered, welcome!')
844 844
845 # redirect to the item's edit page 845 # redirect to the user's page
846 raise Redirect, '%suser%s?@ok_message=%s'%( 846 raise Redirect, '%suser%s?@ok_message=%s&@template=%s'%(self.base,
847 self.base, self.userid, urllib.quote(message)) 847 self.userid, urllib.quote(message), urllib.quote(self.template))
848 848
849 def passResetAction(self): 849 def passResetAction(self):
850 ''' Handle password reset requests. 850 ''' Handle password reset requests.
851 851
852 Presence of either "name" or "address" generate email. 852 Presence of either "name" or "address" generate email.
957 957
958 # commit now that all the tricky stuff is done 958 # commit now that all the tricky stuff is done
959 self.db.commit() 959 self.db.commit()
960 960
961 # redirect to the item's edit page 961 # redirect to the item's edit page
962 raise Redirect, '%s%s%s?@ok_message=%s'%(self.base, self.classname, 962 raise Redirect, '%s%s%s?@ok_message=%s&@template=%s'%(self.base,
963 self.nodeid, urllib.quote(message)) 963 self.classname, self.nodeid, urllib.quote(message),
964 urllib.quote(self.template))
964 965
965 def editItemPermission(self, props): 966 def editItemPermission(self, props):
966 ''' Determine whether the user has permission to edit this item. 967 ''' Determine whether the user has permission to edit this item.
967 968
968 Base behaviour is to check the user can edit this class. If we're 969 Base behaviour is to check the user can edit this class. If we're
1010 return 1011 return
1011 1012
1012 # commit now that all the tricky stuff is done 1013 # commit now that all the tricky stuff is done
1013 self.db.commit() 1014 self.db.commit()
1014 1015
1015 print '%s%s%s?@ok_message=%s'%(self.base, self.classname,
1016 self.nodeid, urllib.quote(messages))
1017 # redirect to the new item's page 1016 # redirect to the new item's page
1018 raise Redirect, '%s%s%s?@ok_message=%s'%(self.base, self.classname, 1017 raise Redirect, '%s%s%s?@ok_message=%s&@template=%s'%(self.base,
1019 self.nodeid, urllib.quote(messages)) 1018 self.classname, self.nodeid, urllib.quote(messages),
1019 urllib.quote(self.template))
1020 1020
1021 def newItemPermission(self, props): 1021 def newItemPermission(self, props):
1022 ''' Determine whether the user has permission to create (edit) this 1022 ''' Determine whether the user has permission to create (edit) this
1023 item. 1023 item.
1024 1024

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