-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
97 lines (93 loc) · 2.88 KB
/
app.py
File metadata and controls
97 lines (93 loc) · 2.88 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from flask import Flask , render_template ,request,jsonify
import firebase_admin
from firebase_admin import credentials, auth, firestore
cred = credentials.Certificate("key.json")
firebase_admin.initialize_app(cred)
firebaseConfig = {
'apiKey': "AIzaSyAGEj-3FnOTx9XFygjcZ5XrhPje2mY4w7s",
'authDomain': "seeker-aa1ec.firebaseapp.com",
'databaseURL': "https://seeker-aa1ec-default-rtdb.firebaseio.com",
'projectId': "seeker-aa1ec",
'storageBucket': "seeker-aa1ec.firebasestorage.app",
'messagingSenderId': "42245521307",
'appId': "1:42245521307:web:963e794ad242509d5feb3e",
'measurementId': "G-54VQX6D9X0"
};
app = Flask(__name__)
db = firestore.client()
@app.route('/')
def index():
return render_template('index.html')
@app.route('/dark.html')
def dark():
return render_template('dark.html')
@app.route('/signin.html',methods=["GET", "POST"])
def signin_page():
if request.method == "POST":
email = request.form["email"]
password = request.form["password"]
try:
user = auth.get_user_by_email(email) # Example: Firebase check
# You might need to verify password here using Firebase
# If successful:
return render_template('/') # redirect to your index page
except:
flash("Invalid credentials. Try again.")
return redirect(url_for("signin"))
return render_template("signin.html")
@app.route('/signup.html')
def signup():
return render_template('signup.html')
@app.route('/darksignin.html')
def darksign():
return render_template('darksignin.html')
@app.route('/darksignup.html')
def darkup():
return render_template('darksignup.html')
@app.route('/about')
def about():
return render_template('about.html')
@app.route('/darkabou')
def darkabout():
return render_template('darkabout.html')
@app.route('/privacy')
def privacy():
return render_template('privacy.html')
@app.route('/priv_')
def priv_D():
return render_template('priv_D.html')
@app.route('/contact')
def contact():
return render_template('contact.html')
@app.route('/image')
def image():
return render_template('lightimage.html')
@app.route('/dimage')
def darkimage():
return render_template('darkimage.html')
@app.route('/settings')
def setting():
return render_template('setting.html')
@app.route('/settingd')
def settingdark():
return render_template('settingd.html')
@app.route('/gpt')
def Filtergpt():
return render_template('FilterGpt.html')
@app.route('/gptd')
def FilterGptDark():
return render_template('FilterGptD.html')
@app.route('/news')
def news():
return render_template('news.html')
@app.route('/newsd')
def newsd():
return render_template('newsd.html')
@app.route('/MAGIC')
def magicspace():
return render_template('MagicSpace.html')
@app.route('/load')
def loading():
return render_template('loadingpage.html')
if __name__ == '__main__':
app.run(debug=True)