Merge pull request #572 from mouse-reeve/shelf-template

Fixes shelf page template path bug
This commit is contained in:
Mouse Reeve 2021-01-30 12:08:29 -08:00 committed by GitHub
commit 2b02aba1cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 17 deletions

View file

@ -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">

View file

@ -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:

View file

@ -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