diff --git a/acmsite/__init__.py b/acmsite/__init__.py index 1e03b66..378b8d3 100644 --- a/acmsite/__init__.py +++ b/acmsite/__init__.py @@ -45,5 +45,8 @@ def create_app(): from .auth import bp as auth_bp app.register_blueprint(auth_bp) + from .dashboard import bp as dash_bp + app.register_blueprint(dash_bp) + return app diff --git a/acmsite/dashboard/__init__.py b/acmsite/dashboard/__init__.py new file mode 100644 index 0000000..cda7b5e --- /dev/null +++ b/acmsite/dashboard/__init__.py @@ -0,0 +1,9 @@ + +from flask import Blueprint, render_template + + +bp = Blueprint('dashboard', __name__, url_prefix='/dashboard') + +@bp.route("/") +def home(): + return render_template('dashboard.html') diff --git a/acmsite/models.py b/acmsite/models.py index c260dec..d300966 100644 --- a/acmsite/models.py +++ b/acmsite/models.py @@ -29,3 +29,12 @@ class PwResetRequest(db.Model): id = Column(String, primary_key=True) user_id = Column(String, ForeignKey('acm_users.id'), nullable=False) expires = Column(DateTime, nullable=False) + +class Event(db.Model): + __tablename__ = "acm_events" + id = Column(String, primary_key=True) + name = Column(String, nullable=False) + description = Column(String, nullable=True) + location = Column(String, nullable=False) + start_time=Column(DateTime, nullable=False) + end_time=Column(DateTime, nullable=False) diff --git a/acmsite/templates/dashboard.html b/acmsite/templates/dashboard.html new file mode 100644 index 0000000..c88eaf5 --- /dev/null +++ b/acmsite/templates/dashboard.html @@ -0,0 +1,16 @@ +{% extends "layout.html" %} + +{% block app_content %} + +
For a list of upcoming events, take a look at our events + listing. + Otherwise, there's not + a whole lot here + unless you're an + officer!
+ +{% endblock app_content %} diff --git a/acmsite/templates/join.html b/acmsite/templates/join.html index 5a7a3ed..0ea6a3d 100644 --- a/acmsite/templates/join.html +++ b/acmsite/templates/join.html @@ -3,6 +3,9 @@ {% block app_content %}Want to join us? Show up to our GBMs and events every week!
+Our upcoming events are:
+ {% endblock %} diff --git a/acmsite/templates/layout.html b/acmsite/templates/layout.html index 918c112..c20a47a 100644 --- a/acmsite/templates/layout.html +++ b/acmsite/templates/layout.html @@ -34,9 +34,9 @@