# HG changeset patch # User Sverre Rabbelier # Date 1236280802 0 # Node ID b2cf6ad50a2a25f7c3c22bcc63c189cab13d78d4 # Parent a3c33bef2ea87e974c7199802360ef9af875e6d7 Make it possible to add some default values to the context Currently only used in show, but easy enough to add elsewhere. Patch by: Sverre Rabbelier diff -r a3c33bef2ea8 -r b2cf6ad50a2a app/soc/views/helper/params.py --- a/app/soc/views/helper/params.py Thu Mar 05 17:44:48 2009 +0000 +++ b/app/soc/views/helper/params.py Thu Mar 05 19:20:02 2009 +0000 @@ -225,6 +225,8 @@ new_params['list_template'] = 'soc/models/list.html' new_params['invite_template'] = 'soc/models/invite.html' + new_params['context'] = None + new_params['export_content_type'] = None new_params['export_extension'] = '.txt' diff -r a3c33bef2ea8 -r b2cf6ad50a2a app/soc/views/models/base.py --- a/app/soc/views/models/base.py Thu Mar 05 17:44:48 2009 +0000 +++ b/app/soc/views/models/base.py Thu Mar 05 19:20:02 2009 +0000 @@ -122,6 +122,8 @@ context['entity_type'] = params['name'] context['entity_type_url'] = params['url_name'] + context = dicts.merge(params['context'], context) + template = params['public_template'] return helper.responses.respond(request, template, context=context)