summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-04-07 02:29:20 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-04-07 02:29:20 +0000
commit98a0aec0d05d654693a2ecfe849886e4f25e9fdc (patch)
treef4c2035dff3dedc206eac7c9d24e19b8c1914df1
parente03e0214789bedcbfdda1dd6b6bf07b1e1b9ba0b (diff)
newforms-admin: Added temporary hack to the admin 'submit_row' template tag so that things will work
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/admin/templatetags/admin_modify.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py
index a9c6b6677f..e7a6cff262 100644
--- a/django/contrib/admin/templatetags/admin_modify.py
+++ b/django/contrib/admin/templatetags/admin_modify.py
@@ -19,13 +19,16 @@ def submit_row(context):
opts = context['opts']
change = context['change']
is_popup = context['is_popup']
+ # TODO: Fix this hack.
+ # save_as = opts.admin.save_as
+ save_as = False
return {
'onclick_attrib': (opts.get_ordered_objects() and change
and 'onclick="submitOrderForm();"' or ''),
'show_delete_link': (not is_popup and context['has_delete_permission']
and (change or context['show_delete'])),
- 'show_save_as_new': not is_popup and change and opts.admin.save_as,
- 'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add']),
+ 'show_save_as_new': not is_popup and change and save_as,
+ 'show_save_and_add_another': not is_popup and (not save_as or context['add']),
'show_save_and_continue': not is_popup and context['has_change_permission'],
'show_save': True
}