Add an _editContext hook
Usefull when one wants to have a hook that will always be called.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/base.py Wed Feb 11 23:44:38 2009 +0000
+++ b/app/soc/views/models/base.py Wed Feb 11 23:47:13 2009 +0000
@@ -678,6 +678,16 @@
if field and value:
seed[field] = value
+ def _editContext(self, request, context):
+ """Performs any required processing on the context for edit pages.
+
+ Args:
+ request: the django request object
+ context: the context dictionary that will be used
+ """
+
+ pass
+
def _constructResponse(self, request, entity, context, form, params):
"""Updates the context and returns a response for the specified arguments.
@@ -721,6 +731,7 @@
else:
template = params['create_template']
+ self._editContext(request, context)
return helper.responses.respond(request, template, context)
def getParams(self):