How many ways can django import a module?
Grep is hard for this.
In .py files
In INSTALLED_APPS and other settings.
Am I missing any? Better question: Why do I have to wonder if I'm missing any?
Grep is hard for this.
In .py files
"import (.*)\..*"
"from (.*)\..* import .*"
"patterns\(['"](.*)['"]"
"url(r?['"].*, ['"](.*)"
In INSTALLED_APPS and other settings.
Am I missing any? Better question: Why do I have to wonder if I'm missing any?
Comments
Think about that for a while...
Anyway, two of the things you've listed are just standard Python import statements, and the other two are just URL-pattern functions which -- if it bugs you that much -- will happily accept the actual callable (or an iterable of patterns, in the case of include()) instead of strings. The string option is mostly just a convenience.
So I'm not sure I really understand the "why do I have to wonder if I'm missing any"; lots of frameworks/libraries have ways to specify something as a string and get it dynamically imported later through some mechanism other than a direct "import whatever" statement.
Oh, and for Doug: the __path__ hacking for templatetags is finally gone in trunk, which means it won't be in 1.2. The last bit of "magic" from magic-removal is finally out, hallelujah.
*: which are sometimes necessary due to definition order and cyclic dependencies etc.