|
|
@ -973,6 +973,8 @@ def admin_forbidden():
|
|
|
|
def stats():
|
|
|
|
def stats():
|
|
|
|
counter = len(db.session.query(db.Books).all())
|
|
|
|
counter = len(db.session.query(db.Books).all())
|
|
|
|
authors = len(db.session.query(db.Authors).all())
|
|
|
|
authors = len(db.session.query(db.Authors).all())
|
|
|
|
|
|
|
|
categorys = len(db.session.query(db.Tags).all())
|
|
|
|
|
|
|
|
series = len(db.session.query(db.Series).all())
|
|
|
|
versions = uploader.book_formats.get_versions()
|
|
|
|
versions = uploader.book_formats.get_versions()
|
|
|
|
vendorpath = os.path.join(config.get_main_dir + "vendor" + os.sep)
|
|
|
|
vendorpath = os.path.join(config.get_main_dir + "vendor" + os.sep)
|
|
|
|
if sys.platform == "win32":
|
|
|
|
if sys.platform == "win32":
|
|
|
@ -989,7 +991,7 @@ def stats():
|
|
|
|
versions['KindlegenVersion'] = lines
|
|
|
|
versions['KindlegenVersion'] = lines
|
|
|
|
versions['PythonVersion'] = sys.version
|
|
|
|
versions['PythonVersion'] = sys.version
|
|
|
|
return render_title_template('stats.html', bookcounter=counter, authorcounter=authors, versions=versions,
|
|
|
|
return render_title_template('stats.html', bookcounter=counter, authorcounter=authors, versions=versions,
|
|
|
|
title=_(u"Statistics"))
|
|
|
|
categorycounter=categorys, seriecounter=series, title=_(u"Statistics"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/shutdown")
|
|
|
|
@app.route("/shutdown")
|
|
|
|