Permalink
Browse files

Merge pull request #1455 from czpython/patch-1

Modified to allow for custom context to be passed.
  • Loading branch information...
2 parents f6cd931 + 5647cad commit a2fdb534044784616992fef25f58f03eff9d8a05 @digi604 digi604 committed Oct 1, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 cms/admin/pageadmin.py
View
@@ -526,7 +526,7 @@ def change_view(self, request, object_id, extra_context=None):
#activate(user_lang_set)
- extra_context = {
+ context = {
'placeholders': self.get_fieldset_placeholders(selected_template),
'page': obj,
'CMS_PERMISSION': settings.CMS_PERMISSION,
@@ -541,7 +541,8 @@ def change_view(self, request, object_id, extra_context=None):
'show_delete_translation': len(obj.get_languages()) > 1,
'current_site_id': settings.SITE_ID,
}
- extra_context = self.update_language_tab_context(request, obj, extra_context)
+ context.update(extra_context or {})
+ extra_context = self.update_language_tab_context(request, obj, context)
tab_language = request.GET.get("language", None)
response = super(PageAdmin, self).change_view(request, object_id, extra_context=extra_context)

0 comments on commit a2fdb53

Please sign in to comment.