Ticket #5520: admin-save-as.diff

File admin-save-as.diff, 1.1 KB (added by Petr Marhoun <petr.marhoun@…>, 17 years ago)
  • django/contrib/admin/templatetags/admin_modify.py

    === modified file 'django/contrib/admin/templatetags/admin_modify.py'
     
    2020    opts = context['opts']
    2121    change = context['change']
    2222    is_popup = context['is_popup']
    23     # TODO: Fix this hack.
    24     # save_as = opts.admin.save_as
    25     save_as = False
     23    save_as = context['save_as']
    2624    return {
    2725        'onclick_attrib': (opts.get_ordered_objects() and change
    2826                            and 'onclick="submitOrderForm();"' or ''),
  • django/contrib/admin/views/main.py

    === modified file 'django/contrib/admin/views/main.py'
     
    129129        'opts': opts,
    130130        'content_type_id': ContentType.objects.get_for_model(model).id,
    131131        'save_on_top': model_admin.save_on_top,
     132        'save_as': model_admin.save_as,
    132133    }
    133134    context.update(extra_context)
    134135    return render_to_response([
Back to Top