mirror of
https://github.com/simple-login/app.git
synced 2025-09-12 17:45:18 +08:00
add py36
This commit is contained in:
parent
d42eea39cc
commit
a20f790fda
2 changed files with 7 additions and 5 deletions
2
.github/workflows/pythonpackage.yml
vendored
2
.github/workflows/pythonpackage.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.6, 3.7]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
|
@ -5,7 +5,7 @@ from app.dashboard.base import dashboard_bp
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.models import GenEmail, ForwardEmailLog, ForwardEmail
|
from app.models import GenEmail, ForwardEmailLog, ForwardEmail
|
||||||
|
|
||||||
LIMIT = 15
|
_LIMIT = 15
|
||||||
|
|
||||||
|
|
||||||
class AliasLog:
|
class AliasLog:
|
||||||
|
@ -39,7 +39,9 @@ def alias_log(alias, page_id):
|
||||||
return redirect(url_for("dashboard.index"))
|
return redirect(url_for("dashboard.index"))
|
||||||
|
|
||||||
logs = get_alias_log(gen_email, page_id)
|
logs = get_alias_log(gen_email, page_id)
|
||||||
last_page = len(logs) < LIMIT # lightweight pagination without counting all objects
|
last_page = (
|
||||||
|
len(logs) < _LIMIT
|
||||||
|
) # lightweight pagination without counting all objects
|
||||||
|
|
||||||
return render_template("dashboard/alias_log.html", **locals())
|
return render_template("dashboard/alias_log.html", **locals())
|
||||||
|
|
||||||
|
@ -51,8 +53,8 @@ def get_alias_log(gen_email: GenEmail, page_id=0):
|
||||||
db.session.query(ForwardEmail, ForwardEmailLog)
|
db.session.query(ForwardEmail, ForwardEmailLog)
|
||||||
.filter(ForwardEmail.id == ForwardEmailLog.forward_id)
|
.filter(ForwardEmail.id == ForwardEmailLog.forward_id)
|
||||||
.filter(ForwardEmail.gen_email_id == gen_email.id)
|
.filter(ForwardEmail.gen_email_id == gen_email.id)
|
||||||
.limit(LIMIT)
|
.limit(_LIMIT)
|
||||||
.offset(page_id * LIMIT)
|
.offset(page_id * _LIMIT)
|
||||||
)
|
)
|
||||||
|
|
||||||
for fe, fel in q:
|
for fe, fel in q:
|
||||||
|
|
Loading…
Add table
Reference in a new issue