diff --git a/pyproger/blog/urls.py b/pyproger/blog/urls.py index 5db58fa..59f7906 100644 --- a/pyproger/blog/urls.py +++ b/pyproger/blog/urls.py @@ -14,7 +14,7 @@ locale.setlocale(locale.LC_ALL, "") @bp.route("/", methods=["GET"]) def index(page=1): session["back_url"] = request.url - per_page = 4 + per_page = 2 posts, total_pages = get_paginated_posts(page, per_page) list_pages = [ x for x in range(1, total_pages + 1) if x >= page - 2 and x <= page + 2 diff --git a/pyproger/templates/blog/base.html b/pyproger/templates/blog/base.html index d7553f0..0256edd 100644 --- a/pyproger/templates/blog/base.html +++ b/pyproger/templates/blog/base.html @@ -11,7 +11,13 @@ - + + + +
@@ -28,10 +34,9 @@
@@ -40,15 +45,126 @@
{% block content %} {% endblock %}
- - + + +
+ +
+ + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+ + + + + © 2023 + Сергей Ванюшкин +
+ г.Нарьян-Мар Ненецкий А.О +
+ + + + + diff --git a/pyproger/templates/blog/index.html b/pyproger/templates/blog/index.html index d29b929..6b1970a 100644 --- a/pyproger/templates/blog/index.html +++ b/pyproger/templates/blog/index.html @@ -9,8 +9,6 @@ {% endblock %} {% block content %} -
-
{% for p in posts %} @@ -30,9 +28,7 @@ {{ p.Post.create_datetime.strftime('%d %B, %Y') }} -
{% endfor %} -
{% endblock %} diff --git a/pyproger/templates/blog/postview.html b/pyproger/templates/blog/postview.html index 575f60b..8cf1d02 100644 --- a/pyproger/templates/blog/postview.html +++ b/pyproger/templates/blog/postview.html @@ -1,22 +1,22 @@ {% extends 'blog/base.html' %} {% block title %} -{{title}} + {{title}} {% endblock %} {% block menu_title %} -{{ menu_title }} + {{ menu_title }} {% endblock %} {% block content %} - -
+

{{ post.Post.title | safe }}

{{ post.Post.text | safe }} -
- + Назад +
+ {% endblock %}