Adrian Holovaty wrote:
Looks like a good solution to me. I kind of liked Max's idea of
"app('django.contrib.admin')", but maybe YAGNI on that. Let's do the
dictionary thing, assuming it's cool with Jacob as well.
I hope I'm not late yet...
I kinda don't like all proposed solutions for they all make the most
common case somewhat harder. In most cases app names do not clash and
there's no need to any abstraction to the app name. And for the rare
case of clash we are obscuring a very clear syntax: a list of paths.
More than this, the current list of paths already has all the
information to distinguish apps: the path itself. In fact I think that
in most cases user's app labels would just repeat the info in path in
form of some prefixes:
INSTALLED_APPS = {
'django_admin': 'django.contrib.admin ',
'myapp_admin': 'myapp.admin'
}
See the repetition?
I propose to just let the django-admin.py accept not only last bit of
paths but also full paths. So if someone has a app name clash he will
just use:
django-admin.py install myapp.admin
I thunk this is much clearer...