[Answer]-Custom django management command not working when deployed as egg

1👍

Django specifically looks up subdirectories. See find_commands function in core/management/init.py. So it won’t work with eggs obviously. The easy fix would be to not distribute your app as an egg. There are only few good reasons to do it nowadays anyway.

You can tell the installer to unpack eggs in the setup.py file. Read this SO answer for details. In that case management commands should work.

0👍

Even if you package it as an eg, you still need it in your installed_apps for django to pick it up.

Leave a comment