diff --git a/goathacks/registration/__init__.py b/goathacks/registration/__init__.py index 00ba6a7..bccafdb 100644 --- a/goathacks/registration/__init__.py +++ b/goathacks/registration/__init__.py @@ -1,6 +1,12 @@ -from flask import Blueprint, flash +from datetime import datetime +from flask import Blueprint, flash, render_template, request +import flask_login from flask_login import current_user +from goathacks.registration.forms import LoginForm, RegisterForm +from werkzeug.security import generate_password_hash +from goathacks import db +from goathacks.models import User bp = Blueprint('registration', __name__, url_prefix="/registration") @@ -9,4 +15,31 @@ def register(): if current_user.is_authenticated: flash("You are already registered and logged in!") + form = RegisterForm(request.form) + if request.method == 'POST' and form.validate(): + email = request.form.get('email') + first_name = request.form.get('first_name') + last_name = request.form.get('last_name') + password = request.form.get('password') + password_c = request.form.get('password_confirm') + + if password == password_c: + # Passwords match! + user = User( + email=email, + password=generate_password_hash(password), + first_name=first_name, + last_name=last_name, + last_login=datetime.now(), + ) + + db.session.add(user) + db.session.commit() + flask_login.login_user(user) + + return "OK" + else: + flash("Passwords do not match") + + return render_template("register.html", form=form) diff --git a/goathacks/registration/forms.py b/goathacks/registration/forms.py index 58eb50e..08f7fd1 100644 --- a/goathacks/registration/forms.py +++ b/goathacks/registration/forms.py @@ -1,5 +1,5 @@ from flask_wtf import FlaskForm -from wtforms import PasswordField, StringField +from wtforms import BooleanField, PasswordField, StringField, SubmitField from wtforms.validators import DataRequired class RegisterForm(FlaskForm): @@ -10,4 +10,11 @@ class RegisterForm(FlaskForm): password = PasswordField("Password", validators=[DataRequired()]) password_confirm = PasswordField("Confirm Password", validators=[DataRequired()]) + agree_coc = BooleanField("I confirm that I have read and agree to the Code of Conduct", validators=[DataRequired()]) + submit = SubmitField("Register") + +class LoginForm(FlaskForm): + email = StringField("Email", validators=[DataRequired()]) + password = PasswordField("Password", validators=[DataRequired()]) + submit = SubmitField("Sign in") diff --git a/goathacks/templates/admin.html b/goathacks/templates/admin.html new file mode 100644 index 0000000..0d9c36b --- /dev/null +++ b/goathacks/templates/admin.html @@ -0,0 +1,279 @@ + + + + + Hack @ WPI + + + + + + + + + + + + + + + + + +
+
+
+
JSON object of users from MLH (Including dropped applications):
+

Do NOT share this URL.

+
Get registered hackers only:
+

JSON CSV

+
+
+
+

Gender:

+ + +
+
+

Schools:

+ + +
+
+

Majors:

+ + +
+
+
+

Counts:

+ + + + + + + + + + + + + + + + + +
TotalAttendeesWaitlistChecked In
{{ total_count }}{{ (total_count - waitlist_count) }}{{ waitlist_count }}{{ check_in_count }}
+ +

Shirts:

+ + + + + + + + + + + + + + + + + + + + + + + +
XXSXSSMLXLXXL
{{ shirt_count['xxs'] }}{{ shirt_count['xs'] }}{{ shirt_count['s'] }}{{ shirt_count['m'] }}{{ shirt_count['l'] }}{{ shirt_count['xl'] }}{{ shirt_count['xxl'] }}
+ +

Hackers:

+ + + + + + + + + + + + + + + + + + + {% for hacker in hackers %} + + + + + + + + + + + + + + + {% endfor %} + +
OptionsChecked In?Waitlisted?AdminMLH IDTime RegisteredEmailNamePhoneShirtSpecialSchool
+
+ + +
+
{{ hacker['checked_in'] }}{{ hacker['waitlisted'] }}{{ hacker['admin'] }}{{ hacker['id'] }}{{ hacker['registration_time'] }}{{ hacker['email'] }}{{ hacker['first_name'] + ' ' + hacker['last_name'] }}{{ hacker['phone_number'] }}{{ hacker['shirt_size'] }}{{ hacker['special_needs'] }}{{ hacker['school']['name'] }}
+
+
+
+ + + + + + diff --git a/goathacks/templates/dashboard.html b/goathacks/templates/dashboard.html new file mode 100644 index 0000000..5787efe --- /dev/null +++ b/goathacks/templates/dashboard.html @@ -0,0 +1,142 @@ +{% include 'header.html' %} + + + + +
+
+
+

Hi {{ name }}!

+ {% if waitlisted %} +

You are waitlisted, if space opens up we will let you know...

+ {% else %} +

You are fully registered! We look forward to seeing you!

+ Let us know if you have any questions by sending them to hack@wpi.edu +
+
+ Forgot to upload your resume while registering? No worries, submit it below. +
+
+
Make sure to join the Slack and enter your shirt size below!
+

(Please note that due to COVID-19 constraints, we can't guarantee that all participants will receive Hack@WPI t-shirts this year but we are trying to find a way!)

+ Slack +
+
+
+
+

Optional Info:

+
+

Shirt Size (Currently selected: {{shirt_size}})

+ + + + + + + + + + + + + + +

Special Needs/Accommodations:

+ +
+

+ +


+
+
+
+
+

If you'd like, add your resume to send to sponsors...

+
+
+ File + +
+
+ +
+
+ +
+ {% endif %} +
+
+ {% if admin %} +
+ + {% endif %} +
+
+
+
+

Drop Application if you can't make it :(

+
+ + + +{% include 'footer.html' %} diff --git a/goathacks/templates/footer.html b/goathacks/templates/footer.html new file mode 100644 index 0000000..4263f50 --- /dev/null +++ b/goathacks/templates/footer.html @@ -0,0 +1,16 @@ + +
+ + + + diff --git a/goathacks/templates/header.html b/goathacks/templates/header.html new file mode 100644 index 0000000..26a453b --- /dev/null +++ b/goathacks/templates/header.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + diff --git a/goathacks/templates/index.html b/goathacks/templates/index.html new file mode 100755 index 0000000..e403835 --- /dev/null +++ b/goathacks/templates/index.html @@ -0,0 +1,195 @@ +{% include 'header.html' %} + +
+ + +
+ Attention! Due to the road conditions, we have delayed the schedule by an hour. We will still have live presentations, but submissions have been extended until 9am, and judging will take place at 10am. +
+ +
+ +
+ + +
+

A HACKATHON FOR ALL COLLEGE STUDENTS

+
+ + +

WPI Campus Center

+

100 Institute Road

+

Worcester, MA 01609

+
+ + + + +

OUR SPONSORS FOR 2020

+ +
+
+
+
+
+

WPI Computer Science Department

+
+ +
+ + + + +
+ +
+ +
+ +
+ + + + + +
+ +
+
+ + +
+
+

FAQs

+ +
+

Who can attend?

+
Our event is open to any college student! You don’t need any experience to participate. However, due to legal issues, anyone under 18 must have a legal guardian present and cannot win prizes
+
+ +
+

What is the max team size?

+
The maximum is 5 people per team. Minimum is 1 :P
+
+ +
+

What are the awards for?

+
The categories this year are:
+
Best Overall Project +
Best Game
+
Best Software
+
Best Hardware
+
Company Favorite
+
Best Use of the Bose API/SDK
+
Best Meme
+
Best Rookie
+
+ +
+

What should I bring?

+
Bring devices, chargers, sleeping bags, toiletries, basically anything you need to be comfortable. We will provide showers at certain time slots during the weekend. Food will also be provided.
+
+ +
+

What if I don't have a team?

+
You don’t need a team to register! We will have a team formation session right after the opening ceremony for those who would like to work with a team. If you prefer to stay solo, that’s also great.
+
+ +
+

How should I prepare beforehand?

+
Make sure you have travel plans in place, especially in case of random snowfalls. Unfortunately, we do not provide travel reimbursements. + It’s also nice to have an idea in mind beforehand. However, we ask that you do not bring any pre-made materials to keep the competition fair.
+
+ +
+

What is the schedule?

+
Here it is! Keep in mind that this is tentative.
+
+
+ +
+ +{% include 'footer.html' %} diff --git a/goathacks/templates/mail.html b/goathacks/templates/mail.html new file mode 100644 index 0000000..3609363 --- /dev/null +++ b/goathacks/templates/mail.html @@ -0,0 +1,101 @@ + + + + 🍪CookieMailer + + + + + + + + +
+
+
+
+

🍪CookieMailer

+ +
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/goathacks/templates/register.html b/goathacks/templates/register.html new file mode 100644 index 0000000..bcd68eb --- /dev/null +++ b/goathacks/templates/register.html @@ -0,0 +1,69 @@ +{% include 'header.html' %} + + + +
+
+
+

Registration

+
+
background
+
+
+
+

Hi {{ name }}, just a few more steps!

+
+
+
+

If you'd like, add your resume to send to sponsors...

+
+
+ File + +
+
+ +
+
+
+

No worries if you don't have one on hand, you can come back and upload it later via the Hack@WPI dashboard!

+

Please take a moment to review the following policies and check all the boxes below so we can finalize your registration:

+

+

Hack@WPI's Terms and Conditions
+

+

+

MLH's Data Sharing Notice
+

+

+

MLH's Privacy Policy
+

+

+

MLH's + Contest Terms and Conditions
+

+

+

MLH's Code of Conduct
+

+
+ + + + + +

+
+
+
+
+
+{% include 'footer.html' %} diff --git a/goathacks/templates/tos.html b/goathacks/templates/tos.html new file mode 100644 index 0000000..09c3da5 --- /dev/null +++ b/goathacks/templates/tos.html @@ -0,0 +1,16 @@ +{% include 'header.html' %} + +
+

+ I agree to hold harmless the organizers of HACK@WPI and WPI’s Chapter of the Association of Computing Machinery (ACM) from any and all claims, lawsuits, demands, causes of action, liability, loss, damage and/or injury of any kind whatsoever (including without limitation all claims for monetary loss, property damager, equitable relief, personal injury and/or wrongful death), whether brought by an individual or other entity. The indemnification applies to and includes, without limitation, the payment of all penalties, fines, judgments, awards, decrees, attorneys’ fees, and related costs or expenses, and any reimbursements to ACM for all legal fees, expenses, and costs incurred by it. +

+ +

+ I also acknowledge the organizers of HACK@WPI will be recording the event using video, photographs, audio recordings, and other media and give them permission to use said media in marketing/promotional materials. +

+
+ + +
+ {% include 'footer.html' %} +