From e795687d04f14205c3415bc54e57c6672b5c934a Mon Sep 17 00:00:00 2001 From: "Ehsan.Asadi" Date: Wed, 31 Dec 2025 03:55:57 +0330 Subject: [PATCH] fix(reflex): create app.py in root and update app_name | ApprovalToken: 1767140757 - Create app.py in root directory to export app for Reflex - Change app_name from 'src' to 'peikarband' to match root directory - Fix relative import in src/__init__.py - Fixes ModuleNotFoundError: Module src.src not found --- peikarband/app.py | 10 ++++++++++ peikarband/rxconfig.py | 2 +- peikarband/src/__init__.py | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 peikarband/app.py diff --git a/peikarband/app.py b/peikarband/app.py new file mode 100644 index 0000000..2f0149c --- /dev/null +++ b/peikarband/app.py @@ -0,0 +1,10 @@ +"""Peikarband Landing Application Entry Point. + +This file exports the Reflex app instance for the landing page. +Reflex will look for 'app' in the root module when app_name matches the root directory. +""" + +from src.presentation.web.pages.landing.index import app + +__all__ = ["app"] + diff --git a/peikarband/rxconfig.py b/peikarband/rxconfig.py index 50b3227..95486f8 100644 --- a/peikarband/rxconfig.py +++ b/peikarband/rxconfig.py @@ -13,7 +13,7 @@ BACKEND_PORT = int(os.getenv("BACKEND_PORT", "8000")) DB_URL = os.getenv("DATABASE_URL", "sqlite:////app/data/reflex.db") config = rx.Config( - app_name="src", + app_name="peikarband", api_url=API_URL, frontend_port=FRONTEND_PORT, backend_port=BACKEND_PORT, diff --git a/peikarband/src/__init__.py b/peikarband/src/__init__.py index 04bc1a5..0451b4f 100644 --- a/peikarband/src/__init__.py +++ b/peikarband/src/__init__.py @@ -3,8 +3,8 @@ This module exports the Reflex app instance for the landing page. """ -# Import the app from the landing page module -from src.presentation.web.pages.landing.index import app +# Import the app from the landing page module using relative import +from .presentation.web.pages.landing.index import app __all__ = ["app"]