-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django custom commands not found when built as .exe #2285
Comments
Ok, after a few hours I noticed that even if were adding the package 'test_app', not all of its contents were going into the lib folder. I'm now using this in my setup.py to get all the contents of a list of main folders that are part of a django project:
Probably not the cleanest way, but it works and auto detects the command without the previous solution I did before. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When adding a Django custom admin command, it wont show or run by default when app is packaged.
To Reproduce
Start a basic boilerplate django app, then add a command:
https://docs.djangoproject.com/en/4.2/howto/custom-management-commands/
Expected behavior
After using setup.py build, should be able to run exename.exe custom_command
Desktop (please complete the following information):
Additional context
I got it working by monkey patching this by importing this on my manage.py script.
And making sure that setup.py has the command.py file in its build_options:
Hope it helps :]
The text was updated successfully, but these errors were encountered: