Skip to content
Browse files

Modified to allow for custom context to be passed.

This view overrides any context passed to it. 
I have modified it to update the context dictionary with the extra context.
  • Loading branch information...
1 parent 9f322fa commit 5647cada0f59eb4ab30e2323505e7fa3cb85863d @czpython czpython committed Sep 30, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 cms/admin/pageadmin.py
View
5 cms/admin/pageadmin.py
@@ -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 5647cad

Please sign in to comment.
Something went wrong with that request. Please try again.