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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -1,21 +1,18 @@
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:
 
1
  import os
2
  import sys
3
 
4
+ # Add the current working directory to Python's module search path
5
+ current_dir = os.path.dirname(os.path.abspath(__file__))
 
6
 
7
+ if current_dir not in sys.path:
8
+ sys.path.insert(0, current_dir)
 
9
 
10
+ # Debugging: Check Python's module search path
 
 
 
11
  print("DEBUG: sys.path =", sys.path)
12
+
13
+ # Debugging: Verify the presence of directories and files
14
+ print("DEBUG: Does 'routes' directory exist? ", os.path.exists(os.path.join(current_dir, "routes")))
15
+ print("DEBUG: Does 'auth.py' exist in 'routes'? ", os.path.exists(os.path.join(current_dir, "routes", "auth.py")))
16
 
17
  # Import modules
18
  try: