Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

newforms-admin: Added temporary hack to the admin 'submit_row' templa…

…te tag so that things will work

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 98a0aec0d05d654693a2ecfe849886e4f25e9fdc 1 parent e03e021
Adrian Holovaty authored
7  django/contrib/admin/templatetags/admin_modify.py
@@ -19,13 +19,16 @@ def submit_row(context):
19 19
     opts = context['opts']
20 20
     change = context['change']
21 21
     is_popup = context['is_popup']
  22
+    # TODO: Fix this hack.
  23
+    # save_as = opts.admin.save_as
  24
+    save_as = False
22 25
     return {
23 26
         'onclick_attrib': (opts.get_ordered_objects() and change
24 27
                             and 'onclick="submitOrderForm();"' or ''),
25 28
         'show_delete_link': (not is_popup and context['has_delete_permission']
26 29
                               and (change or context['show_delete'])),
27  
-        'show_save_as_new': not is_popup and change and opts.admin.save_as,
28  
-        'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add']),
  30
+        'show_save_as_new': not is_popup and change and save_as,
  31
+        'show_save_and_add_another': not is_popup and (not save_as or context['add']),
29 32
         'show_save_and_continue': not is_popup and context['has_change_permission'],
30 33
         'show_save': True
31 34
     }

0 notes on commit 98a0aec

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