-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.py
34 lines (26 loc) · 873 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
from flask import Flask,request,render_template,url_for,session,Blueprint
import os
from login import LoginPage
from Home import HomePage
from SignUp import signupPage
from profile import ProfilePage
from Logout import LogoutPage
from werkzeug.utils import redirect
from utils import *
from config import *
PEOPLE_FOLDER = os.path.join('static', 'images')
connection = open_connection("hospital.db")
cursor = get_cursor(connection)
Database_Setup(cursor)
app=Flask(__name__)
app.secret_key=os.urandom(32)
# The bluePrint to help us to connect the files
app.register_blueprint(HomePage)
app.register_blueprint(LoginPage)
app.register_blueprint(signupPage)
app.register_blueprint(ProfilePage)
app.register_blueprint(LogoutPage)
app.config['UPLOAD_FOLDER'] = PEOPLE_FOLDER
STATIC_FOLDER = app.config['UPLOAD_FOLDER']
if __name__=="__main__":
app.run(debug=True)