forked from mirrors/bookwyrm
Display correct username on shelf page
This commit is contained in:
parent
78336531c9
commit
c889fab6d1
2 changed files with 6 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
<div id="content">
|
||||
<div>
|
||||
<h2>{% include 'snippets/username.html' %} > {{ shelf.name }}</h2>
|
||||
<h2>{% include 'snippets/username.html' with user=user %} > {{ shelf.name }}</h2>
|
||||
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue