Spaces:
Sleeping
Sleeping
ssl
Browse files
db.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
from tortoise import Tortoise
|
| 2 |
import os
|
| 3 |
-
|
| 4 |
|
| 5 |
TORTOISE_ORM = {
|
| 6 |
"connections": {
|
|
@@ -12,7 +12,13 @@ TORTOISE_ORM = {
|
|
| 12 |
"user": os.getenv("DB_USER"),
|
| 13 |
"password": os.getenv("DB_PASSWORD"),
|
| 14 |
"database": "postgres",
|
| 15 |
-
# "ssl": ssl_context, # Uncomment this if SSL is required
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
},
|
| 17 |
}
|
| 18 |
},
|
|
|
|
| 1 |
from tortoise import Tortoise
|
| 2 |
import os
|
| 3 |
+
import ssl
|
| 4 |
|
| 5 |
TORTOISE_ORM = {
|
| 6 |
"connections": {
|
|
|
|
| 12 |
"user": os.getenv("DB_USER"),
|
| 13 |
"password": os.getenv("DB_PASSWORD"),
|
| 14 |
"database": "postgres",
|
| 15 |
+
# "ssl": ssl_context, # Uncomment this if SSL is required import ssl
|
| 16 |
+
# ...existing code...
|
| 17 |
+
"credentials": {
|
| 18 |
+
# ...existing code...
|
| 19 |
+
"ssl": ssl.create_default_context(), # Add this if Supabase requires SSL
|
| 20 |
+
},
|
| 21 |
+
# ...existing code...
|
| 22 |
},
|
| 23 |
}
|
| 24 |
},
|