Spaces:
Sleeping
Sleeping
Gouzi Mohaled
commited on
Commit
·
00f738d
1
Parent(s):
48ba28f
app.py remplcement
Browse files
app.py
CHANGED
@@ -874,17 +874,20 @@ def send_verification_email(email: str, token: str) -> bool:
|
|
874 |
try:
|
875 |
subject = "Vérification de votre compte"
|
876 |
# Utiliser directement localhost:8501 sans http://
|
877 |
-
base_url = os.getenv('APP_URL', '').rstrip('/')
|
878 |
if "localhost" in base_url:
|
879 |
protocol = "http://"
|
880 |
else:
|
881 |
protocol = "https://"
|
|
|
882 |
# Construire l'URL avec le format correct pour Streamlit
|
883 |
if base_url.startswith(protocol):
|
884 |
verification_url = f"{base_url}/Verify_email?token={token}"
|
885 |
else:
|
|
|
886 |
verification_url = f"{protocol}{base_url}/Verify_email?token={token}"
|
887 |
-
|
|
|
888 |
html_content = f"""
|
889 |
<html>
|
890 |
<body>
|
|
|
874 |
try:
|
875 |
subject = "Vérification de votre compte"
|
876 |
# Utiliser directement localhost:8501 sans http://
|
877 |
+
base_url = base_url = os.getenv('APP_URL', '').rstrip('/')
|
878 |
if "localhost" in base_url:
|
879 |
protocol = "http://"
|
880 |
else:
|
881 |
protocol = "https://"
|
882 |
+
|
883 |
# Construire l'URL avec le format correct pour Streamlit
|
884 |
if base_url.startswith(protocol):
|
885 |
verification_url = f"{base_url}/Verify_email?token={token}"
|
886 |
else:
|
887 |
+
|
888 |
verification_url = f"{protocol}{base_url}/Verify_email?token={token}"
|
889 |
+
# Note: "Verify_email" correspond au nom de la page dans Streamlit (le nom du fichier sans .py)
|
890 |
+
|
891 |
html_content = f"""
|
892 |
<html>
|
893 |
<body>
|