-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.py
38 lines (30 loc) · 908 Bytes
/
app.py
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
from flask import Flask, jsonify, request, render_template, session, redirect, url_for
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
CORS(app)
# Set a secret key for session management
app.secret_key = 'your_secret_key' # Change this to a strong, random secret key
def is_user_authenticated():
print(str(session))
return 'user_id' in session
@app.route('/')
def main_index():
return render_template('index.html')
@app.route('/home')
def login_page():
return render_template('landing_page.html')
@app.route('/about')
def about():
return render_template('aboutus.html')
@app.route('/view')
def view():
return render_template('view.html')
@app.route('/send')
def send():
return render_template('send.html')
@app.route('/edit')
def edit():
return render_template('edit.html')
if __name__ == '__main__':
app.run(debug=True)