+ def digest(self):
+ serialized_body = ';'.join(sorted('%s:%s' % item for item in self.body.iteritems()))
+ data = '%s%s%s%s%s' % (self.id, self.contact, serialized_body, self.ip, self.form_tag)
+ data = force_str(data)
+ return sha1(data).hexdigest()
+
+ @permalink
+ def update_url(self):
+ return 'edit_form', [], {'form_tag': self.form_tag, 'contact_id': self.id, 'key': self.key}
+