It would be nice if the django module could use the compress command for managing offline minification/concatenation of static files. This is part of the django_compressor package, which is separate from Django, but is fairly popular and compressing offline would generally be part of a deploy step for those of us that use it. If this is something you think belongs in the Django module, let me know and I can work on a pull request for it (if that’s cool).
Thanks!
Note: I’ve just been playing with ansible for a couple of weeks. And thus, can’t really answer your questions.
I just took a quick look at the source in library/web_infrastructure/django_manage.
My first thought is that I would rather be able to do arbitrary management commands than be confined to what is setup in command_allowed_param_map
.
It looks like the docs have come apart from the code a bit:
choices description code
migrate Y Y
runfcgi Y
createcachetable Y Y
…
Keeping this module working and useful for everyone using Django seems difficult. What version of django? What installed_apps? Are we talking about south’s syncdb or django’s syncdb? What if I override migrate for myself? What if I have my own compress command? What about my own management commands that I need to run?
I wonder if it is too late to thin out this wrapper and let people run arbitrary management commands with little/no param checking? I suppose the advantages over the shell module could be in the integration with virtualenv, etc.
Don't forget support for "changed".
At work we need to delete ghost migrations sometimes, so we had to put
in a command "python manage.py migrate --delete-ghost-migrations
--noinput". I was in a hurry, so I didn't try to put it in the
django_manage module (also, t didn't seem obvious how to provide for
arbitrary options with .changed support in my available time).
I wasn't going to say anything on the list, but if we are going to
generalise the django_manage module, here's another use case.
J
I’d like to see things continue to validate that the command is valid.
I’m ok with adding the new command as long as if it’s not installed there is sensible error detection.