Display correct username on shelf page

This commit is contained in:
Mouse Reeve
2020-02-21 16:40:49 -08:00
parent 78336531c9
commit c889fab6d1
2 changed files with 6 additions and 2 deletions

View File

@ -270,7 +270,11 @@ def shelf_page(request, username, shelf_identifier):
return HttpResponseNotFound()
shelf = models.Shelf.objects.get(user=user, identifier=shelf_identifier)
return TemplateResponse(request, 'shelf.html', {'shelf': shelf})
data = {
'shelf': shelf,
'user': user,
}
return TemplateResponse(request, 'shelf.html', data)
@login_required