убрал сессион
parent
2c6c2ebbe9
commit
18724c455a
|
@ -1,15 +1,7 @@
|
||||||
import locale
|
import locale
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from flask import (
|
from flask import abort, current_app, redirect, render_template, request, url_for
|
||||||
abort,
|
|
||||||
current_app,
|
|
||||||
redirect,
|
|
||||||
render_template,
|
|
||||||
request,
|
|
||||||
session,
|
|
||||||
url_for,
|
|
||||||
)
|
|
||||||
|
|
||||||
from ..dbase.database import (
|
from ..dbase.database import (
|
||||||
get_all_posts_by_tag,
|
get_all_posts_by_tag,
|
||||||
|
@ -26,7 +18,6 @@ locale.setlocale(locale.LC_ALL, "")
|
||||||
@bp.route("/", methods=["GET"], defaults={"page": 1})
|
@bp.route("/", methods=["GET"], defaults={"page": 1})
|
||||||
@bp.route("/<int:page>")
|
@bp.route("/<int:page>")
|
||||||
def index(page=1):
|
def index(page=1):
|
||||||
session["back_url"] = request.url
|
|
||||||
per_page = current_app.config.get("POSTS_ON_PAGE")
|
per_page = current_app.config.get("POSTS_ON_PAGE")
|
||||||
|
|
||||||
posts, total = get_paginated_posts(page, per_page)
|
posts, total = get_paginated_posts(page, per_page)
|
||||||
|
|
Loading…
Reference in New Issue