diff --git a/nfoguard-web/__init__.py b/nfoguard-web/__init__.py new file mode 100644 index 0000000..0adb35b --- /dev/null +++ b/nfoguard-web/__init__.py @@ -0,0 +1 @@ +# NFOGuard Web Interface Package \ No newline at end of file diff --git a/nfoguard-web/api/__init__.py b/nfoguard-web/api/__init__.py new file mode 100644 index 0000000..f272338 --- /dev/null +++ b/nfoguard-web/api/__init__.py @@ -0,0 +1 @@ +# NFOGuard Web API Package \ No newline at end of file diff --git a/nfoguard-web/api/web_routes.py b/nfoguard-web/api/web_routes.py index 302352f..6e197a5 100644 --- a/nfoguard-web/api/web_routes.py +++ b/nfoguard-web/api/web_routes.py @@ -8,6 +8,9 @@ from typing import List, Optional, Dict, Any from fastapi import HTTPException, Query from pathlib import Path +import sys +import os +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from api.models import * diff --git a/nfoguard-web/main_web.py b/nfoguard-web/main_web.py index 788e61f..07a88e6 100644 --- a/nfoguard-web/main_web.py +++ b/nfoguard-web/main_web.py @@ -13,8 +13,9 @@ from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from fastapi.responses import FileResponse -# Add current directory to path for imports +# Add current directory and parent directory to path for imports sys.path.append(str(Path(__file__).parent)) +sys.path.append(str(Path(__file__).parent.parent)) # Import web-specific configuration from config.web_settings import web_config