Ticket #9147: preview_9070.diff
File preview_9070.diff, 1.1 KB (added by , 16 years ago) |
---|
-
contrib/formtools/preview.py
60 60 f = self.form(request.POST, auto_id=AUTO_ID) 61 61 context = {'form': f, 'stage_field': self.unused_name('stage'), 'state': self.state} 62 62 if f.is_valid(): 63 self.process_preview(request, f, context) 63 64 context['hash_field'] = self.unused_name('hash') 64 65 context['hash_value'] = self.security_hash(request, f) 65 66 return render_to_response(self.preview_template, context, context_instance=RequestContext(request)) … … 96 97 """ 97 98 pass 98 99 100 def process_preview(self, request, form, context): 101 """ 102 Given a validated form, performs any extra processing before displaying 103 the preview page, and saves any extra data in context. 104 """ 105 pass 106 99 107 def security_hash(self, request, form): 100 108 """ 101 109 Calculates the security hash for the given HttpRequest and Form instances.