nagasurendra commited on
Commit
e2b0ccc
·
verified ·
1 Parent(s): 3ad592f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -1,17 +1,15 @@
1
  import os
2
  import sys
3
 
4
- # Add the current working directory explicitly to the Python path
5
- current_dir = os.path.dirname(os.path.abspath(__file__))
6
- if current_dir not in sys.path:
7
- sys.path.insert(0, current_dir)
8
 
9
- # Debugging: Print the module search path
10
  print("DEBUG: sys.path =", sys.path)
11
-
12
- # Debugging: Verify the existence of key directories and files
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: