python - How to write custom django manage.py commands in multiple apps -


imagine have 2 or more apps in django project, able write , execute custom manage.py commands when had 1 app, a.

now have new app, b, , mentioned in https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ created directory structure of b/manangement/commands , wrote custom module.

when run python manage.py , keeps complaining unknown command. if move command other app, i.e. folder a/management/commands , run python manage.py <command>, works seamlessly.

any idea how can resolve this?

as @babu said in comments, looks may not have added app installed_apps in settings.py.

it's possible you're missing __init__.py files (that required in python modules) management , commands folders.

alternatively, (sorry this) may have misspelt "management" or "commands", or name of command you're running.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -