forked from fediversity/fediversity
		
	revert change on USER_SETTINGS_FILE, fixing dev shell
This commit is contained in:
		
							parent
							
								
									afbbcbc22d
								
							
						
					
					
						commit
						e3b816d85e
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		|  | @ -176,14 +176,15 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' | |||
| # TODO(@fricklerhandwerk): | ||||
| #     we may want to do this with a flat environment instead, and get all values from `os.environ.get()`. | ||||
| #     this would make it more obvious which moving parts there are, if that environment is specified for development/staging/production in a visible place. | ||||
| user_settings_file = env["USER_SETTINGS_FILE"] | ||||
| spec = importlib.util.spec_from_file_location("user_settings", user_settings_file) | ||||
| if spec is None or spec.loader is None: | ||||
|     raise RuntimeError("User settings specification failed!") | ||||
| module = importlib.util.module_from_spec(spec) | ||||
| spec.loader.exec_module(module) | ||||
| sys.modules["user_settings"] = module | ||||
| from user_settings import *  # noqa: F403 # pyright: ignore [reportMissingImports] | ||||
| user_settings_file = env.get("USER_SETTINGS_FILE", None) | ||||
| if user_settings_file is not None: | ||||
|     spec = importlib.util.spec_from_file_location("user_settings", user_settings_file) | ||||
|     if spec is None or spec.loader is None: | ||||
|         raise RuntimeError("User settings specification failed!") | ||||
|     module = importlib.util.module_from_spec(spec) | ||||
|     spec.loader.exec_module(module) | ||||
|     sys.modules["user_settings"] = module | ||||
|     from user_settings import *  # noqa: F403 # pyright: ignore [reportMissingImports] | ||||
| 
 | ||||
| # non-Django application settings | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue