On 1/17/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 1/14/06, Max Battcher <[EMAIL PROTECTED]> wrote:
> > Joseph Kocherhans wrote:
> > > Any ideas that don't involve 50+ character table names and 10 level
> > > deep template directories? ;-)
> >
> > What about application relabeling? Just like you might do a python
> > ``import something as somebettername`` when there are conflicts across
> > namespaces or you just want something nicer in your actual code, you
> > could just add an "as" option to INSTALLED_APPS to specify an app name.
>
> This is a pretty nice idea. How would the syntax look in INSTALLED_APPS?
The most obvious options I see are:
INSTALLED_APPS = (
'django.contrib.admin',
'myapp.admin as myadmin',
)
or use tuples (or maybe dicts) like:
INSTALLED_APPS = (
('django.contrib.admin', 'admin'),
('myapp.admin', 'myadmin'),
)
I don't really like the second option (too much extra typing for the
simple and most often used case), but the first option feels kind of
magical. I guess another option would be to allow a combination of
strings and tupes like:
INSTALLED_APPS = (
'django.contrib.admin',
('myapp.admin', 'myadmin'),
)
The new django.conf.settings object could "do the right thing (tm)"
depending on the type. This option seems like it might be confusing
for people though.
Out of the 3 I think I like 'myapp.admin as myadmin' the best.
Preferences? Other options?
Joseph