Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

magic-removal: url fixes in admin. Thanks Nebojsa.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 79b57ab50bb7233e59c47b93b41b603e12b13c6b 1 parent d42511d
@rjwittams rjwittams authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 django/contrib/admin/views/stages/change.py
View
8 django/contrib/admin/views/stages/change.py
@@ -33,7 +33,7 @@ def change_stage(request, path, object_id):
if not request.user.has_perm(app_label + '.' + opts.get_change_permission()):
raise PermissionDenied
if request.POST and request.POST.has_key("_saveasnew"):
- return add_stage(request, path, form_url='../add/')
+ return add_stage(request, path, form_url='../../add/')
try:
manipulator_class = model.ChangeManipulator
manipulator = manipulator_class(object_id)
@@ -61,13 +61,13 @@ def change_stage(request, path, 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()
Please sign in to comment.
Something went wrong with that request. Please try again.