Ticket #13875: 13875-r16357.diff
File 13875-r16357.diff, 1.2 KB (added by , 13 years ago) |
---|
-
django/contrib/admin/templatetags/admin_modify.py
1 1 from django import template 2 from django.template.context import Context 2 3 3 4 register = template.Library() 4 5 … … 28 29 change = context['change'] 29 30 is_popup = context['is_popup'] 30 31 save_as = context['save_as'] 31 return { 32 new_context = Context(context) 33 new_context.update({ 32 34 'onclick_attrib': (opts.get_ordered_objects() and change 33 35 and 'onclick="submitOrderForm();"' or ''), 34 36 'show_delete_link': (not is_popup and context['has_delete_permission'] … … 37 39 'show_save_and_add_another': context['has_add_permission'] and 38 40 not is_popup and (not save_as or context['add']), 39 41 'show_save_and_continue': not is_popup and context['has_change_permission'], 40 'is_popup': is_popup,41 42 'show_save': True 42 } 43 }) 44 return new_context 45 43 46 44 47 @register.filter 45 48 def cell_count(inline_admin_form):