diff --git a/flask_app.py b/flask_app.py index 2c346b4..46d2095 100644 --- a/flask_app.py +++ b/flask_app.py @@ -15,7 +15,8 @@ from flask import Flask, render_template, redirect, url_for, request, session, j from flask_sqlalchemy import SQLAlchemy from werkzeug.utils import secure_filename -from config_hackWPI import api_keys, SERVER_LISTEN_ADDR, SERVER_PORT, WAITLIST_LIMIT, HACKATHON_TIME, ALLOWED_EXTENSIONS +from config_hackWPI import (api_keys, SERVER_LISTEN_ADDR, SERVER_PORT, WAITLIST_LIMIT, HACKATHON_TIME, + ALLOWED_EXTENSIONS, REGISTRATION_OPEN) app = Flask(__name__) app.config.from_pyfile('config.py') @@ -54,11 +55,13 @@ def server_error(): @app.route('/') def root(): - print("Someone visited!.") - return render_template('index.html') + return render_template('index.html', registration_open=REGISTRATION_OPEN) @app.route('/resumepost', methods=['POST']) def resumepost(): + if not REGISTRATION_OPEN: + return 'Registration is currently closed.', 403 + """A last minute hack to let people post their resume after they've already registered""" if request.method == 'POST': if 'resume' not in request.files: @@ -85,6 +88,9 @@ def resumepost(): @app.route('/register', methods=['GET', 'POST']) def register(): + if not REGISTRATION_OPEN: + return 'Registration is currently closed.', 403 + if request.method == 'GET': # Register a hacker... if is_logged_in() and db.session.query( diff --git a/static/assets/Hack@WPI-SponsorshipInformation-2019.pdf b/static/assets/Hack@WPI-SponsorshipInformation-2019.pdf deleted file mode 100644 index a8e7d9c..0000000 Binary files a/static/assets/Hack@WPI-SponsorshipInformation-2019.pdf and /dev/null differ diff --git a/static/assets/Hack@WPI-SponsorshipInformation-2020.pdf b/static/assets/Hack@WPI-SponsorshipInformation-2020.pdf new file mode 100644 index 0000000..4f56560 Binary files /dev/null and b/static/assets/Hack@WPI-SponsorshipInformation-2020.pdf differ diff --git a/templates/index.html b/templates/index.html index 6c0ec49..8b5e854 100755 --- a/templates/index.html +++ b/templates/index.html @@ -1,6 +1,5 @@ {% include 'header.html' %}
- Major League Hacking 2019 Hackathon Season
@@ -11,26 +10,34 @@
- today January 18 - 20th, 2019 + today January 17 - 19th, 2020
room WPI Odeum
- Register + {% if registration_open %} + Register + {% else %} + Registration isn't open yet. + {% endif %}
-
- Schedule -
+ {% if registration_open %} +
+ Schedule +
+ {% endif %}
@@ -98,7 +105,7 @@
Sponsorship Package + href= "../static/assets/Hack@WPI-SponsorshipInformation-2020.pdf">Sponsorship Package

@@ -112,34 +119,22 @@
-
-

Partners

- -

Platinum Sponsors

- +

Gold Sponsors

-

Silver Sponsors

-

Bronze Sponsors

- - -
-
-

Other Sponsors

-
@@ -156,37 +151,39 @@

For any inquiries regarding sponsoring the event as a company or co-sponsoring the event as an on campus club, please email hack@wpi.edu, and we will happily discuss it with you!

- -