now keep size over reloads of page, its hacky though

This commit is contained in:
2021-02-02 01:15:28 +11:00
parent bca8aed31b
commit 1e219fd2b8
2 changed files with 38 additions and 9 deletions

View File

@@ -105,12 +105,14 @@ def files():
grouping="Day"
how_many="50"
offset=0
size=128
if request.method=="POST":
noo=request.form['noo']
how_many=request.form['how_many']
offset=int(request.form['offset'])
grouping=request.form['grouping']
size = request.form['size']
if 'prev' in request.form:
offset -= int(how_many)
if offset < 0:
@@ -123,7 +125,7 @@ def files():
entries=Entry.query.join(File).order_by(File.year,File.month,File.day,Entry.name).offset(offset).limit(how_many).all()
else:
entries=Entry.query.join(File).order_by(File.year.desc(),File.month.desc(),File.day.desc(),Entry.name).offset(offset).limit(how_many).all()
return render_template("files.html", page_title='View Files', entry_data=entries, noo=noo, grouping=grouping, how_many=how_many, offset=offset )
return render_template("files.html", page_title='View Files', entry_data=entries, noo=noo, grouping=grouping, how_many=how_many, offset=offset, size=size )
################################################################################
# /search -> show thumbnail view of files from import_path(s)