I have a custom django admin call that I am able to successfully call from the command line using: python manage.py mycustomcommand. Therefore, the directories are setup with the necessary init files in 'management' and 'commands' folders, and I have listed the apps under INSTALLED_APPS in my settings file.
When I try to run the command from another file and use call_command('mycustomcommand') is says the command is an unknown command. How does it work from the command line but not from call_command? I ran get_commands() from 'core.management' and my command is not listed there. Do I need to do something more so that it can be found?
If it matters, I am trying to call mycustomcommand from an app directory that is different from the app directory where the custom command lives. All my app directories have the correct structure and are in INSTALLED_APPS. All my googling seems to suggest it should just work and I've tried all reasonable suggestions to no avail. Thanks for any insight.