I have a Django project with "django.contrib.staticfiles" in INSTALLED_APPS. Therefore, I can run ./manage.py collectstatic. But I need to use call_command.
Running python -c 'from django.core.management import call_command; call_command("collectstatic")' results in django.core.management.base.CommandError: Unknown command: 'collectstatic'
What am I doing wrong? Shouldn't the 2 commands be absolutely identical? Obviously, environments, paths, etc are correct in both cases. I am running both commands from the same shell in a docker container.