nagasurendra commited on
Commit
8a99355
·
verified ·
1 Parent(s): e2b0ccc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -1,15 +1,21 @@
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:
 
1
  import os
2
  import sys
3
 
4
+ # Dynamically add the correct project root path to Python's module search path
5
+ project_root = os.path.abspath(os.path.dirname(__file__))
6
+ nested_project_root = os.path.join(project_root, "nagasurendra", "restaurant-ordering-system")
7
+
8
+ # Add both root paths to sys.path
9
+ if nested_project_root not in sys.path:
10
+ sys.path.insert(0, nested_project_root)
11
+
12
  if project_root not in sys.path:
13
  sys.path.insert(0, project_root)
14
 
15
  # Debugging: Verify the paths
16
  print("DEBUG: sys.path =", sys.path)
17
+ print("DEBUG: Does 'routes' directory exist? ", os.path.exists(os.path.join(nested_project_root, "routes")))
18
+ print("DEBUG: Does 'auth.py' exist in 'routes'? ", os.path.exists(os.path.join(nested_project_root, "routes", "auth.py")))
19
 
20
  # Import modules
21
  try: