Adding file handler

This commit is contained in:
Kevin Chung
2016-11-05 00:54:21 -04:00
parent 11e3ef66b4
commit 52ad396db4
7 changed files with 36 additions and 17 deletions

View File

@@ -24,7 +24,10 @@ def challenges_view():
if view_after_ctf(): # But we are allowed to view after the CTF ends
pass
else: # We are NOT allowed to view after the CTF ends
errors.append('{} has ended'.format(ctf_name()))
if get_config('start') and not ctf_started():
errors.append('{} has not started yet'.format(ctf_name()))
if (get_config('end') and ctf_ended()) and not view_after_ctf():
errors.append('{} has ended'.format(ctf_name()))
return render_template('chals.html', errors=errors, start=int(start), end=int(end))
if get_config('verify_emails') and not is_verified(): # User is not confirmed
return redirect(url_for('auth.confirm_user'))