# HG changeset patch # User Sverre Rabbelier # Date 1235517075 0 # Node ID 1387f0d2cf45272d073b5a2e6c27d111a8ca9e6e # Parent da531df1d92ed40f06b24718d3188f327e348e52 Pass the seed to _constructResponse This way _editContext has access to it; this will be used by the commenting system. Patch by: Sverre Rabbelier diff -r da531df1d92e -r 1387f0d2cf45 app/soc/views/models/base.py --- 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):