File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1006,8 +1006,8 @@ def module(self) -> str:
10061006 Returns:
10071007 The module name.
10081008 """
1009- if self .app_module is not None :
1010- return self .app_module . __name__
1009+ if self .app_module_import is not None :
1010+ return self .app_module_import
10111011 return "." .join ([self .app_name , self .app_name ])
10121012
10131013 def update_from_env (self ) -> dict [str , Any ]:
Original file line number Diff line number Diff line change @@ -300,9 +300,9 @@ def get_reload_paths() -> Sequence[Path]:
300300 The reload paths for the backend.
301301 """
302302 config = get_config ()
303- reload_paths = [Path ( config . app_name ). parent ]
304- if config .app_module is not None and config . app_module . __file__ :
305- module_path = Path (config . app_module . __file__ ).resolve ().parent
303+ reload_paths = [Path . cwd () ]
304+ if ( spec := importlib . util . find_spec ( config .module )) is not None and spec . origin :
305+ module_path = Path (spec . origin ).resolve ().parent
306306
307307 while module_path .parent .name and any (
308308 sibling_file .name == "__init__.py"
You can’t perform that action at this time.
0 commit comments