loud-lizard-41405
03/31/2021, 11:13 PMhundreds-father-404
03/31/2021, 11:38 PMhundreds-father-404
03/31/2021, 11:45 PMloud-lizard-41405
03/31/2021, 11:46 PMImproperlyConfigured
exceptionloud-lizard-41405
03/31/2021, 11:46 PMmanage.py
is set as my entry point, it appears that my models are being evaluated first, which results in django not being configured yet.loud-lizard-41405
03/31/2021, 11:49 PMpython manage.py
but that doesn't appear to be how it is actually executing. I put a print at the top of my manage.py
as well as my model files and I can see pretty conclusively that files other than the entry point are being evaluated first which is totally unexpected.hundreds-father-404
03/31/2021, 11:52 PMzip_safe=False
..Alternatively, execution_mode='venv'
, which should also net you better performanceloud-lizard-41405
03/31/2021, 11:54 PMzip_safe
loud-lizard-41405
03/31/2021, 11:56 PMvenv
either, still running out of expected orderloud-lizard-41405
04/01/2021, 12:02 AMmanage.py
script lives in a module which has an __init__.py
script. What appears to be happening is that even though manage.py
is the explicit entrypoint, __init__.py
is executed first which causes things to break. As a dummy hack, I import an empty function from manage.py
into __init__.py
to ensure it is run first.loud-lizard-41405
04/01/2021, 12:04 AMpython entry_point.py
which isn't the case.hundreds-father-404
04/01/2021, 12:05 AMpex_binary
, including mentioning the new execution_mode
thing we added recently but haven't yet had the time to documentenough-analyst-54434
04/01/2021, 12:29 AMenough-analyst-54434
04/01/2021, 12:31 AM__init__.py
bit. But wouldn't that be a problem in any execution environment?enough-analyst-54434
04/01/2021, 12:32 AMenough-analyst-54434
04/01/2021, 12:35 AMpython -m myapp.manage
not python myapp/manage.py
. Presumable python -m myapp.manage
would give you the same troubles as PEX.loud-lizard-41405
04/01/2021, 12:35 AMenough-analyst-54434
04/01/2021, 12:39 AMenough-analyst-54434
04/01/2021, 12:40 AMenough-analyst-54434
04/01/2021, 12:53 AMenough-analyst-54434
04/01/2021, 12:54 AMloud-lizard-41405
04/01/2021, 3:19 AMloud-lizard-41405
04/01/2021, 3:19 AMhappy-kitchen-89482
04/02/2021, 1:12 AM