forked from mirrors/bookwyrm
Fixes shelf redirects
This commit is contained in:
parent
c7863ec8f0
commit
210cf4a702
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue