mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Correct code I did done yesterday
This commit is contained in:
parent
d1b3afdb22
commit
8357241487
10 changed files with 62 additions and 18 deletions
|
@ -3,7 +3,7 @@ Onlylegs Gallery - Index view
|
|||
"""
|
||||
from math import ceil
|
||||
|
||||
from flask import Blueprint, render_template, request
|
||||
from flask import Blueprint, render_template, request, current_app
|
||||
from werkzeug.exceptions import abort
|
||||
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
@ -26,7 +26,7 @@ def index():
|
|||
|
||||
# pagination, defaults to page 1 if no page is specified
|
||||
page = request.args.get('page', default=1, type=int)
|
||||
limit = 100
|
||||
limit = current_app.config['UPLOAD_CONF']['max-load']
|
||||
|
||||
# get the total number of images in the database
|
||||
# calculate the total number of pages, and make sure the page number is valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue