From e4532411ce7ab8286684ee86303600a4c2d1d011 Mon Sep 17 00:00:00 2001 From: Matte23 Date: Thu, 6 Nov 2025 14:58:43 +0100 Subject: [PATCH] feat: Add menu entry for cheater list --- __init__.py | 12 ++++++------ templates/cheaters.html | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/__init__.py b/__init__.py index 61275e2..f147840 100644 --- a/__init__.py +++ b/__init__.py @@ -1,13 +1,11 @@ import os -from flask import render_template, Blueprint -from flask import request - -from .models import CheaterTeams - +from CTFd.models import db from CTFd.plugins.migrations import upgrade from CTFd.utils.decorators import admins_only -from CTFd.models import db +from flask import Blueprint, render_template, request + +from .models import CheaterTeams PLUGIN_PATH = os.path.dirname(__file__) @@ -34,4 +32,6 @@ def load(app): app.db.create_all() upgrade(plugin_name="cheaters") + register_admin_plugin_menu_bar(title="Cheaters", route="/admin/cheaters") + app.register_blueprint(bp) diff --git a/templates/cheaters.html b/templates/cheaters.html index e90ed59..3421026 100644 --- a/templates/cheaters.html +++ b/templates/cheaters.html @@ -1,7 +1,4 @@ -{% extends "base.html" %} - -{% block stylesheets %} -{% endblock %} +{% extends "admin/base.html" %} {% block content %}