Spaces:
Runtime error
Runtime error
Arrcttacsrks
commited on
Commit
•
ee99924
1
Parent(s):
7a36c10
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
from flask import Flask, render_template
|
2 |
-
|
3 |
-
app = Flask(__name__)
|
4 |
-
|
5 |
-
@app.route('/')
|
6 |
-
def index():
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
1 |
+
from flask import Flask, render_template, request
|
2 |
+
|
3 |
+
app = Flask(__name__)
|
4 |
+
|
5 |
+
@app.route('/')
|
6 |
+
def index():
|
7 |
+
user_ip = request.remote_addr # Lấy địa chỉ IP của người dùng
|
8 |
+
return render_template('index.html', user_ip=user_ip)
|
9 |
+
|
10 |
+
if __name__ == '__main__':
|
11 |
+
app.run(debug=True)
|