Skip to content

Commit

Permalink
configured init.py and tested adding new routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathode-Negative committed Nov 19, 2024
1 parent 682a796 commit 6a42e8c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CTFd/plugins/UserChallengeManagement/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from flask import render_template


def load(app):

@app.route('/faq', methods=['GET'])
def view_faq():
return render_template('page.html', content="<h1>FAQ Page</h1>")

@app.route('/user/challenges',methods=['GET'])
def view_challenges():
return render_template('admin/challenges/challenges.html')

#TODO: add custom html extension of admin/challenges/challenges
# change methods to check for rights and only display challenges by user
# add custom html to change challenge editing to be available to users
#
# add other plugin to modify challenge creation?
4 changes: 4 additions & 0 deletions CTFd/plugins/UserChallengeManagement/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "UserChallengeManagement",
"route": "/user/challenges"
}

0 comments on commit 6a42e8c

Please sign in to comment.