Skip to content

Commit 1c0f8b2

Browse files
author
eshaan7
committed
replace ctfname with organization
1 parent f5d5bf9 commit 1c0f8b2

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/FlaskRTBCTF/ctf/routes.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from FlaskRTBCTF import db, bcrypt
66
from FlaskRTBCTF.models import User, Score
77
from FlaskRTBCTF.ctf.forms import UserHashForm, RootHashForm
8-
from FlaskRTBCTF.config import ctfname, box, userHash, rootHash, userScore, rootScore
8+
from FlaskRTBCTF.config import organization, box, userHash, rootHash, userScore, rootScore
99
from datetime import datetime
1010

1111
ctf = Blueprint('ctf', __name__)
@@ -21,7 +21,8 @@ def scoreboard():
2121
for score in scores:
2222
userNameScoreList.append({'username': User.query.get(score.user_id).username,'score':score.points})
2323

24-
return render_template('scoreboard.html', scores=userNameScoreList, ctfname=ctfname)
24+
return render_template('scoreboard.html', scores=userNameScoreList, organization=organization)
25+
2526

2627
''' Machine Info '''
2728

@@ -31,7 +32,7 @@ def machine():
3132
userHashForm = UserHashForm()
3233
rootHashForm = RootHashForm()
3334
return render_template('machine.html', userHashForm=userHashForm,
34-
rootHashForm=rootHashForm, ctfname=ctfname, box=box)
35+
rootHashForm=rootHashForm, organization=organization, box=box)
3536

3637
''' Hash Submission Management '''
3738

@@ -54,10 +55,10 @@ def validateRootHash():
5455
else:
5556
flash("Sorry! Wrong system hash", "danger")
5657
return render_template('machine.html', userHashForm=userHashForm,
57-
rootHashForm=rootHashForm, ctfname=ctfname, box=box)
58+
rootHashForm=rootHashForm, organization=organization, box=box)
5859
else:
5960
return render_template('machine.html', userHashForm=userHashForm,
60-
rootHashForm=rootHashForm, ctfname=ctfname, box=box)
61+
rootHashForm=rootHashForm, organization=organization, box=box)
6162

6263

6364
@ctf.route("/validateUserHash", methods=['POST'])
@@ -79,9 +80,9 @@ def validateUserHash():
7980
else:
8081
flash("Sorry! Wrong user hash", "danger")
8182
return render_template('machine.html', userHashForm=userHashForm,
82-
rootHashForm=rootHashForm, ctfname=ctfname, box=box)
83+
rootHashForm=rootHashForm, organization=organization, box=box)
8384
else:
8485
return render_template('machine.html', userHashForm=userHashForm,
85-
rootHashForm=rootHashForm, ctfname=ctfname, box=box)
86+
rootHashForm=rootHashForm, organization=organization, box=box)
8687

8788

src/FlaskRTBCTF/main/routes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from flask import render_template, Blueprint
2-
from FlaskRTBCTF.config import ctfname, RunningTime
2+
from FlaskRTBCTF.config import organization, RunningTime
33
from FlaskRTBCTF.models import Notification
44

55
main = Blueprint('main', __name__)
@@ -9,9 +9,9 @@
99
@main.route("/")
1010
@main.route("/home")
1111
def home():
12-
return render_template('home.html', ctfname=ctfname, RunningTime=RunningTime)
12+
return render_template('home.html', organization=organization, RunningTime=RunningTime)
1313

1414
@main.route("/notifications")
1515
def notifications():
1616
notifs = Notification.query.order_by(Notification.timestamp.desc()).all()
17-
return render_template('notifications.html', ctfname=ctfname, title="Notifications", notifs=notifs)
17+
return render_template('notifications.html', organization=organization, title="Notifications", notifs=notifs)

0 commit comments

Comments
 (0)