management loaddata with verbosity > 0 fails silently under WSGI
|Reported by:||Charlie DeTar||Owned by:||nobody|
|Severity:||Keywords:||management loaddata verbosity stdout wsgi|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When using mod_wsgi and apache, a script which calls the following fails silently:
from django.core import management management.call_command("loaddata", "some_fixture")
Presumably, this has something to do with the fact that by default, "loaddata" prints status information to standard out, which is forbidden under WSGI. The same command with "verbosity=0" succeeds.
Rather than failing silently, the call with verbosty > 0 should either function properly or raise an exception when run under WSGI.
Change History (6)
comment:1 Changed 7 years ago by
|Patch needs improvement:||unset|