Stats: Add ability to select date range

This commit is contained in:
rubenwardy
2023-06-14 22:47:08 +01:00
parent 516361345e
commit 80c42637df
9 changed files with 102 additions and 22 deletions

View File

@@ -725,8 +725,12 @@ def game_support(package):
@bp.route("/packages/<author>/<name>/stats/")
@is_package_page
def statistics(package):
start = request.args.get("start")
end = request.args.get("end")
return render_template("packages/stats.html",
package=package, tabs=get_package_tabs(current_user, package), current_tab="stats")
package=package, tabs=get_package_tabs(current_user, package), current_tab="stats",
start=start, end=end, options=get_daterange_options(), noindex=start or end)
@bp.route("/packages/<author>/<name>/stats.csv")