Fixes shelf redirects

This commit is contained in:
Mouse Reeve 2021-03-31 15:03:07 -07:00
parent c7863ec8f0
commit 210cf4a702

View file

@ -102,7 +102,7 @@ def create_shelf(request):
return redirect(request.headers.get("Referer", "/")) return redirect(request.headers.get("Referer", "/"))
shelf = form.save() shelf = form.save()
return redirect("/user/%s/shelf/%s" % (request.user.localname, shelf.identifier)) return redirect(shelf.local_path)
@login_required @login_required
@ -114,7 +114,7 @@ def delete_shelf(request, shelf_id):
return HttpResponseBadRequest() return HttpResponseBadRequest()
shelf.delete() shelf.delete()
return redirect("/user/%s/shelves" % request.user.localname) return redirect("user-shelves", request.user.localname)
@login_required @login_required