-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (30 loc) · 939 Bytes
/
main.py
File metadata and controls
41 lines (30 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from flask import Flask, render_template, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
db = SQLAlchemy()
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, unique=True, nullable=False)
password = db.Column(db.String, nullable=False)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/login')
def login():
return redirect(url_for('home'))
@app.route('/logout')
def logout():
return redirect(url_for('home'))
@app.route('/exam-tracker')
def exam_tracker():
return render_template('exam-tracker.html')
@app.route('/daily-quiz')
def daily_quiz():
return render_template('in-progress.html')
@app.route('/webscraper-tools')
def webscraper():
return render_template('in-progress.html')
@app.route('/useful-resources')
def resources():
return render_template('in-progress.html')
app.run()