Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,15 @@
|
|
1 |
import os
|
2 |
import sys
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
-
if
|
7 |
-
sys.path.insert(0,
|
8 |
|
9 |
-
# Debugging:
|
10 |
print("DEBUG: sys.path =", sys.path)
|
11 |
-
|
12 |
-
|
13 |
-
print("DEBUG: Does 'routes' directory exist? ", os.path.exists(os.path.join(current_dir, "routes")))
|
14 |
-
print("DEBUG: Does 'auth.py' exist in 'routes'? ", os.path.exists(os.path.join(current_dir, "routes", "auth.py")))
|
15 |
|
16 |
# Import modules
|
17 |
try:
|
|
|
1 |
import os
|
2 |
import sys
|
3 |
|
4 |
+
# Dynamically set the correct root directory for the project
|
5 |
+
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "nagasurendra/restaurant-ordering-system"))
|
6 |
+
if project_root not in sys.path:
|
7 |
+
sys.path.insert(0, project_root)
|
8 |
|
9 |
+
# Debugging: Verify the paths
|
10 |
print("DEBUG: sys.path =", sys.path)
|
11 |
+
print("DEBUG: Does 'routes' directory exist? ", os.path.exists(os.path.join(project_root, "routes")))
|
12 |
+
print("DEBUG: Does 'auth.py' exist in 'routes'? ", os.path.exists(os.path.join(project_root, "routes", "auth.py")))
|
|
|
|
|
13 |
|
14 |
# Import modules
|
15 |
try:
|