diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d32bf79 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/db.cpython-310.pyc diff --git a/__pycache__/app.cpython-310.pyc b/__pycache__/app.cpython-310.pyc index 423f707..528922f 100644 Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ diff --git a/__pycache__/app.cpython-39.pyc b/__pycache__/app.cpython-39.pyc new file mode 100644 index 0000000..eaf2a30 Binary files /dev/null and b/__pycache__/app.cpython-39.pyc differ diff --git a/__pycache__/db.cpython-310.pyc b/__pycache__/db.cpython-310.pyc new file mode 100644 index 0000000..04ba1d0 Binary files /dev/null and b/__pycache__/db.cpython-310.pyc differ diff --git a/__pycache__/db.cpython-39.pyc b/__pycache__/db.cpython-39.pyc new file mode 100644 index 0000000..aa12ad7 Binary files /dev/null and b/__pycache__/db.cpython-39.pyc differ diff --git a/__pycache__/scoreboard.cpython-310.pyc b/__pycache__/scoreboard.cpython-310.pyc new file mode 100644 index 0000000..2dd70a3 Binary files /dev/null and b/__pycache__/scoreboard.cpython-310.pyc differ diff --git a/app.py b/app.py index fcf316c..4f992db 100644 --- a/app.py +++ b/app.py @@ -1,26 +1,211 @@ from datetime import datetime from flask import Flask, render_template, request, redirect, url_for, send_from_directory +import db +import scoreboard +from collections import defaultdict + +# from db import day1events, day2events +from flask import g + app = Flask(__name__) +events = db.events +# events = db.events.sort({'event_id':1}) +# g.events = events.find({}) @app.route('/') def index(): print('Request for index page received') - # return render_template('index.html') - return redirect("/prefest") + return redirect("/events") @app.route('/prefest') def prefest(): - return render_template('prefest.html') + print('Request for prefest page received') + return redirect("/events") + +@app.route('/admin_control') +def admin_route(): + print("reached admin") + + return '