Hello again - One more question. In django, everyt...
# general
Hello again - One more question. In django, everything seems to be correctly set up, when running shell (e.g.
./pants run backend/modules/mod1:manage -- shell
). However when I do runserver (e.g.
./pants run backend/modules/mod1:manage -- runserver
) it complains that django is not installed. (No module found...) Any idea why? it seems to disregard all installed side-packages...
There is a gotcha with
because the Django development server’s autoreloading logic does some syspath hacks that don’t interact well with pants’s sandboxing.
The solution is to do
runserver --noreload
And let Pants do the reloading
which it does more precisely anyway
Writing a Django-specific tutorial with this sort of stuff in it is on my todo list…
(to let Pants do the reloading set
on the pex_binary target that wraps
Okay that works, thatnk @happy-kitchen-89482
However, why doesn't the django example need this norelead flag?
Found it ... It uses norelead under the hood due to custom manage.py...
Ah yes, lots of hackery…
Sorry, this is poorly documented
We really should have a Django page in the docs
All good - I was just very very confused 😄
Oh wow. We spent days trying to fix this 😅
Thanks for the help!