Skip to content

Commit

Permalink
#85 moved plain pagination template into plain theme directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ephes committed Mar 26, 2023
1 parent 5a898a5 commit abbe02b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cast/templates/cast/plain/blog_list_of_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ <h1>{{ page.title }}</h1>

{% block footer %}
<footer>
{% include "pagination.html" %}
{% include "./cast/plain/pagination.html" %}
</footer>
{% endblock footer %}
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/pagination_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@


def test_pagination_template_is_not_paginated(simple_request):
r = render(simple_request, "pagination.html", {})
r = render(simple_request, "cast/plain/pagination.html", {})
html = r.content.decode("utf-8").strip()
assert html == ""


def test_pagination_template_is_paginated(simple_request):
r = render(simple_request, "pagination.html", {"is_paginated": True})
r = render(simple_request, "cast/plain/pagination.html", {"is_paginated": True})
html = r.content.decode("utf-8").strip()
assert "pagination" in html

Expand All @@ -28,7 +28,7 @@ def test_pagination_template_is_paginated_long(simple_request):
"object_list": page.object_list,
"page_range": page.paginator.get_elided_page_range(page.number, on_each_side=2, on_ends=1),
}
r = render(simple_request, "pagination.html", context)
r = render(simple_request, "cast/plain/pagination.html", context)
html = r.content.decode("utf-8").strip()
assert "page=1" in html # first page
assert "page=500" in html # last page
Expand Down

0 comments on commit abbe02b

Please sign in to comment.