mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 12:01:14 +00:00
Fixes shelf page template path bug
This commit is contained in:
parent
7afab352b1
commit
0c723eb550
3 changed files with 15 additions and 17 deletions
|
@ -1,21 +1,19 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% extends 'user/user_layout.html' %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h1 class="title">
|
||||
{% if is_self %}Your
|
||||
{% else %}
|
||||
{% include 'snippets/username.html' with user=user possessive=True %}
|
||||
{% endif %}
|
||||
shelves
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'snippets/user_header.html' with user=user %}
|
||||
{% block header %}
|
||||
<header class="columns">
|
||||
<h1 class="title">
|
||||
{% if is_self %}Your
|
||||
{% else %}
|
||||
{% include 'snippets/username.html' with user=user possessive=True %}
|
||||
{% endif %}
|
||||
shelves
|
||||
</h1>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
<div class="block columns">
|
||||
<div class="column">
|
||||
<div class="tabs" role="tablist">
|
|
@ -41,7 +41,7 @@ class ShelfViews(TestCase):
|
|||
is_api.return_value = False
|
||||
result = view(request, self.local_user.username, shelf.identifier)
|
||||
self.assertIsInstance(result, TemplateResponse)
|
||||
self.assertEqual(result.template_name, 'shelf.html')
|
||||
self.assertEqual(result.template_name, 'user/shelf.html')
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
||||
with patch('bookwyrm.views.shelf.is_api_request') as is_api:
|
||||
|
|
|
@ -62,7 +62,7 @@ class Shelf(View):
|
|||
'books': [b.book for b in books],
|
||||
}
|
||||
|
||||
return TemplateResponse(request, 'shelf.html', data)
|
||||
return TemplateResponse(request, 'user/shelf.html', data)
|
||||
|
||||
@method_decorator(login_required, name='dispatch')
|
||||
# pylint: disable=unused-argument
|
||||
|
|
Loading…
Reference in a new issue