mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-05 06:48:43 +00:00
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 id="content">
|
||||||
<div>
|
<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 %}
|
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -270,7 +270,11 @@ def shelf_page(request, username, shelf_identifier):
|
||||||
return HttpResponseNotFound()
|
return HttpResponseNotFound()
|
||||||
|
|
||||||
shelf = models.Shelf.objects.get(user=user, identifier=shelf_identifier)
|
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
|
@login_required
|
||||||
|
|
Loading…
Reference in a new issue