Hi, On 10/27/2015 03:40 PM, bwv549 wrote: > I have some commands I'd like to include in the manage command (i.e., > like 'coverage'). How to make a global command? (I've written many > commands for apps, but wonder how to make one that isn't tied to any app).
You can't. Management commands are always tied to an app. That said, many people have an overly-narrow view of what an "app" must be. A Django "app" can be any Python package at all that you include a reference to in your INSTALLED_APPS setting. It doesn't need to have models, or urls, or views. For instance, I often list my top-level project package in INSTALLED_APPS as an "app", just so I can put e.g. management commands or template tags there, if they are really project-wide utilities that don't naturally fit in any sub-package/app. Note of course that which app contains a management command has no practical effect on its use (except when it comes to overriding management commands and the ordering of `INSTALLED_APPS`). Carl -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/562FF06B.5000504%40oddbird.net. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature