From de5ea1d18c24a3d5c550d3e6fe3d65e8eaf5a914 Mon Sep 17 00:00:00 2001 From: Joseph Kocherhans Date: Fri, 20 Jan 2006 17:43:14 +0000 Subject: [PATCH] magic-removal: fixed some broken urls for post-add redirects in the admin system. git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2075 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/views/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 9b61e3be3e..d69dc898ce 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -330,13 +330,13 @@ def change_stage(request, app_label, model_name, object_id): return HttpResponseRedirect(request.path) elif request.POST.has_key("_saveasnew"): request.user.add_message(_('The %(name)s "%(obj)s" was added successfully. You may edit it again below.') % {'name': opts.verbose_name, 'obj': new_object}) - return HttpResponseRedirect("../../%s/" % pk_value) + return HttpResponseRedirect("../%s/" % pk_value) elif request.POST.has_key("_addanother"): request.user.add_message(msg + ' ' + (_("You may add another %s below.") % opts.verbose_name)) - return HttpResponseRedirect("../../add/") + return HttpResponseRedirect("../add/") else: request.user.add_message(msg) - return HttpResponseRedirect("../../") + return HttpResponseRedirect("../") else: # Populate new_data with a "flattened" version of the current data. new_data = manipulator.flatten_data()