Re: apps with the same name

2006-01-19 Thread Radek Svarz
What is so strange about "myapp.admin as admin" ?Users of Django are usually familiar with such syntax - SQL uses that, Python import uses that. From the user readibility I prefer it.With: INSTALLED_APPS = (    'foo.bar.baz',    ('foo.baz.baz', 'baz2'),)you will have to deal with several brackets a

Re: apps with the same name

2006-01-18 Thread Jacob Kaplan-Moss
On Jan 18, 2006, at 8:23 PM, Adrian Holovaty wrote: On 1/18/06, hugo <[EMAIL PROTECTED]> wrote: How about something like this: INSTALLED_APPS = ( 'foo.bar.baz', ('foo.baz.baz', 'baz2'), ) This seems to be a good compromise -- it requires no change for the common case, and it's not "cod

Re: apps with the same name

2006-01-18 Thread Adrian Holovaty
On 1/18/06, hugo <[EMAIL PROTECTED]> wrote: > How about something like this: > > INSTALLED_APPS = ( >'foo.bar.baz', >('foo.baz.baz', 'baz2'), > ) This seems to be a good compromise -- it requires no change for the common case, and it's not "code as string" stuff. Shall we? Adrian -- Adr

Re: apps with the same name

2006-01-18 Thread Eugene Lazutkin
hugo wrote: How about something like this: INSTALLED_APPS = ( 'foo.bar.baz', ('foo.baz.baz', 'baz2'), ) +1.

Re: apps with the same name

2006-01-18 Thread Joseph Kocherhans
On 1/18/06, Maniac <[EMAIL PROTECTED]> wrote: > > 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 Unfortunately, this alone doesn't solve the possible

Re: apps with the same name

2006-01-18 Thread hugo
>I'll admit there's something a little magic about adding "code" to a >string in the "foo as bar" proposal, but it strikes me as pretty >obvious magic. How about something like this: INSTALLED_APPS = ( 'foo.bar.baz', ('foo.baz.baz', 'baz2'), ) So essentially either provide a string - in t

Re: apps with the same name

2006-01-18 Thread Maniac
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

Re: apps with the same name

2006-01-18 Thread jacobian
At first glance, I think I prefer the "myapp.admin as admin" syntax. It seems like the dictionary is boilerplate -- 99% of the time, you're going to be doing:: INSTALLED_APPS = { 'news' : 'ellington.news', 'photos' : 'ellington.photos', # etc } Put another way: E

Re: apps with the same name

2006-01-18 Thread Adrian Holovaty
On 1/18/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > 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 requi

Re: apps with the same name

2006-01-18 Thread Joseph Kocherhans
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 lo

Re: apps with the same name

2006-01-17 Thread Russell Keith-Magee
On 1/18/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > This is a pretty nice idea. How would the syntax look in INSTALLED_APPS?INSTALLED_APPS = ('django.contrib.admin',('myapp.admin', 'myadmin'),)I'm +1 on this one; Existing behaviour is unaffected, new behaviour makes sense without bei

Re: apps with the same name

2006-01-17 Thread Max Battcher / WorldMaker
I was thinking that another option would be to decouple the INSTALLED_APPS setting from the data store to allow for future changes (such as a better place to store app-specific settings than the global namespace as CAPS_NAMES in the settings file), similar to the patterns() and include() functions

Re: apps with the same name

2006-01-17 Thread Joseph Kocherhans
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? Jus

Re: apps with the same name

2006-01-17 Thread Adrian Holovaty
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``

Re: apps with the same name

2006-01-14 Thread Amit Upadhyay
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

Re: apps with the same name

2006-01-14 Thread Max Battcher
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 s

apps with the same name

2006-01-13 Thread Joseph Kocherhans
n settings.py. That's simply not acceptable. I imagine there's a similar problem with the filesystem template loader. If apps with duplicate names aren't *really* going to work, then I think the admin urls should change back. Breadcrumbs and admin urls were a lot less complicated be