On 1/17/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> Another option would be to allow a dictionary for INSTALLED_APPS:
>
> INSTALLED_APPS = {
> 'admin': 'django.contrib.admin ',
> 'myadmin': 'myapp.admin'
> }
I think I like this option the best so far. It's very explicit, and
looks a lot cleaner than a bunch of tuples. I don't think requiring
the app name to be explicit is too high of a price. Adding things to
INSTALLED_APPS is a rare enough event that a few keystrokes probably
won't matter much. (It certainly isn't a big deal for me anyhow.) This
way we don't have to describe the rules for calculating the app name
either.
Any preferences Adrian? There are a few bugs in django.contrib.admin
I'd like to fix (history for example), but this ought to be done
first....
Assuming this change, admin urls should change back to myapp/mymodel,
and the breadcrumbs should be simplified as well.
Also, I think maybe the app_directories template loader ought to be
changed to take templates straight from myapp/templates rather than
myapp/templates/myapp. This gets rid of one extra level of hierarchy,
and allows a user to install a 3rd party app using a different name
without having to change the directory name in the app.
This *would* disallow people from overriding the admin templates in
their app, they'd have to do it in their project or whatever by using
the filesystem template loader. I consider this a good thing though as
it makes it impossible for two apps to override the same admin
template, thus, there's no question as to which one gets used.
The filesystem loader should use the overriden app name in calculating
template directory names.
There are certainly going to be a few more issues with templates, but
I think I'd need to dig in to the code more to figure them all out.
Joseph