--- a/web/form.py Fri Nov 27 09:10:40 2009 +0100
+++ b/web/form.py Fri Nov 27 09:14:31 2009 +0100
@@ -42,16 +42,20 @@
"""abstract form mix-in
XXX: you should inherit from this FIRST (obscure pb with super call)
"""
+ force_session_key = None
def session_key(self):
"""return the key that may be used to store / retreive data about a
previous post which failed because of a validation error
"""
- return '%s#%s' % (self.req.url(), self.domid)
def __init__(self, req, rset, **kwargs):
super(FormMixIn, self).__init__(req, rset, **kwargs)
self.restore_previous_post(self.session_key())
+ try:
+ return self.force_session_key
+ except AttributeError:
+ return '%s#%s' % (self.req.url(), self.domid)
def restore_previous_post(self, sessionkey):
# get validation session data which may have been previously set.