Pass the seed to _constructResponse
This way _editContext has access to it; this will be used by the
commenting system.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/base.py Tue Feb 24 23:10:50 2009 +0000
+++ b/app/soc/views/models/base.py Tue Feb 24 23:11:15 2009 +0000
@@ -448,6 +448,9 @@
self._editSeed(request, seed)
if seed:
+ # pass the seed through the context to _constructResponse
+ # it will be popped before dispatching to Django
+ context['seed'] = seed
form = params['create_form'](initial=seed)
else:
form = params['create_form']()
@@ -788,6 +791,10 @@
template = params['create_template']
self._editContext(request, context)
+
+ # remove the seed from the context before dispatching to Django
+ context.pop('seed', None)
+
return helper.responses.respond(request, template, context)
def getParams(self):