Re: Fixing app_label

2007-12-11 Thread Vinay Sajip
On Dec 5, 5:55 pm, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> wrote: > Howdy folks -- > > I just had a nasty realization here at work: we're gonna need to fix > app_label pretty damn quick. The good news is that this means we'll > get to fix this problem on work time; the bad news is that I'm total

Re: Fixing app_label

2007-12-10 Thread Vinay Sajip
On Dec 11, 12:10 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-12-10 at 15:45 -0800, Vinay Sajip wrote: > > [...] > > > Plus, I've probably > > missed some obvious point which kills the idea stone dead :-( > > Since views are just Python functions, they don't necessarily have

Re: Fixing app_label

2007-12-10 Thread Malcolm Tredinnick
On Mon, 2007-12-10 at 15:45 -0800, Vinay Sajip wrote: [...] > Plus, I've probably > missed some obvious point which kills the idea stone dead :-( Since views are just Python functions, they don't necessarily have a concept of "current app". It also looks very over-engineered without any motivat

Re: Fixing app_label

2007-12-10 Thread Vinay Sajip
On Dec 10, 6:58 pm, "Joseph Kocherhans" <[EMAIL PROTECTED]> wrote: > On 12/9/07, Gary Wilson <[EMAIL PROTECTED]> wrote: > > > > > > > Vinay Sajip wrote: > > > On Dec 7, 6:35 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > > >> On Dec 7, 2007 12:56 PM, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > >

Re: Fixing app_label

2007-12-10 Thread Joseph Kocherhans
On 12/9/07, Gary Wilson <[EMAIL PROTECTED]> wrote: > > Vinay Sajip wrote: > > On Dec 7, 6:35 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > >> On Dec 7, 2007 12:56 PM, Vinay Sajip <[EMAIL PROTECTED]> wrote: > >> > >>> this be allowed/disallowed/checked for? As for standard template > >>> loading,

Re: Fixing app_label

2007-12-09 Thread SmileyChris
On Dec 10, 2:41 pm, Gary Wilson <[EMAIL PROTECTED]> wrote: > The current app_directories template loader has always bugged me because it > is: > > 1) inefficient - all application template directories are added as global > template directories and are searched each time by the template loader.

Re: Fixing app_label

2007-12-09 Thread Gary Wilson
Vinay Sajip wrote: > On Dec 7, 6:35 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: >> On Dec 7, 2007 12:56 PM, Vinay Sajip <[EMAIL PROTECTED]> wrote: >> >>> this be allowed/disallowed/checked for? As for standard template >>> loading, there's no reason that the standard template loading >>> (app_lo

Re: Fixing app_label

2007-12-07 Thread Vinay Sajip
On Dec 7, 6:35 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Dec 7, 2007 12:56 PM, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > > this be allowed/disallowed/checked for? As for standard template > > loading, there's no reason that the standard template loading > > (app_loader) code could not

Re: Fixing app_label

2007-12-07 Thread Marty Alchin
On Dec 7, 2007 12:56 PM, Vinay Sajip <[EMAIL PROTECTED]> wrote: > this be allowed/disallowed/checked for? As for standard template > loading, there's no reason that the standard template loading > (app_loader) code could not be modified to work with App instances, > using whatever logic to use the

Re: Fixing app_label

2007-12-07 Thread Vinay Sajip
On Dec 7, 8:25 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-12-05 at 11:55 -0600, Jacob Kaplan-Moss wrote: > > [...] > > Jumping in a little late here, but the things I remember thinking about > (and discussing briefly with Adrian when he described his plan to me) is > that a

Re: Fixing app_label

2007-12-07 Thread Vinay Sajip
On Dec 5, 7:48 pm, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: > On Dec 5, 2007 11:55 AM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > Great to hear this is gaining some momentum. I'm not a fan of the > patch on 3591, as it goes only halfway (by adding the app() function), > stopping short o

Re: Fixing app_label

2007-12-07 Thread Forest Bond
Hi, On Fri, Dec 07, 2007 at 10:56:09AM -0500, Empty wrote: > On Dec 7, 2007 7:09 AM, Forest Bond <[EMAIL PROTECTED]> wrote: > > On Fri, Dec 07, 2007 at 07:25:03PM +1100, Malcolm Tredinnick wrote: > > > (or stop using app_loader, which is something I've been tending towards > > > more and more late

Re: Fixing app_label

2007-12-07 Thread Empty
On Dec 7, 2007 7:09 AM, Forest Bond <[EMAIL PROTECTED]> wrote: > Hi, > > On Fri, Dec 07, 2007 at 07:25:03PM +1100, Malcolm Tredinnick wrote: > > (or stop using app_loader, which is something I've been tending towards more > > and more lately). > > And how does one do that? > Just remove 'django.t

Re: Fixing app_label

2007-12-07 Thread Forest Bond
Hi, On Fri, Dec 07, 2007 at 07:25:03PM +1100, Malcolm Tredinnick wrote: > (or stop using app_loader, which is something I've been tending towards more > and more lately). And how does one do that? -Forest -- Forest Bond http://www.alittletooquiet.net signature.asc Description: Digital signatu

Re: Fixing app_label

2007-12-07 Thread Malcolm Tredinnick
On Wed, 2007-12-05 at 11:55 -0600, Jacob Kaplan-Moss wrote: [...] > So what I'm looking for here is some insight from folks that have > already looked at this ticket. What are the with the current patch? > Are there simpler ways? What types of breakage should I be looking > for? Is there anything

Re: Fixing app_label

2007-12-06 Thread Amit Upadhyay
On Dec 6, 2007 1:46 AM, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > Why not also use actual module objects here instead of strings like with > > view functions in urlconfs? > > I don't see the benefit. It makes sense for views so you can apply > decorators to them in your urls.py file. I'm n

Re: Fixing app_label

2007-12-05 Thread Ivan Sagalaev
Jacob Kaplan-Moss wrote: > It's *extremely* useful to be able to inspect settings files *without* > triggering imports of all INSTALLED_APPS Got it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers

Re: Fixing app_label

2007-12-05 Thread Marty Alchin
On Dec 5, 2007 2:48 PM, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Great to hear this is gaining some momentum. I'm not a fan of the > patch on 3591, as it goes only halfway (by adding the app() function), > stopping short of a full, elegant solution. The approach I've been > wanting to take is

Re: Fixing app_label

2007-12-05 Thread Marty Alchin
On Dec 5, 2007 4:00 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > It's *extremely* useful to be able to inspect settings files *without* > triggering imports of all INSTALLED_APPS -- I've got at least a dozen > utilities that operate on multiple sites by introspecting various > settings modul

Re: Fixing app_label

2007-12-05 Thread Jacob Kaplan-Moss
On 12/5/07, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > Why not also use actual module objects here instead of strings like with > view functions in urlconfs? It's *extremely* useful to be able to inspect settings files *without* triggering imports of all INSTALLED_APPS -- I've got at least a doze

Re: Fixing app_label

2007-12-05 Thread Jacob Kaplan-Moss
Hey Adrian -- I haven't had time to fully think through your idea -- there's something about it that rubs me the wrong way, but I can't put my finger on it -- but I do have one question/idea: On 12/5/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > This could be fully backwards-compatible. If IN

Re: Fixing app_label

2007-12-05 Thread [EMAIL PROTECTED]
Joseph makes a good point about not importing much in the settings file, so maybe one solution is not to do it in the settings file. We could treat it like urls. That is, INSTALLED_APPS = 'myproject.apps', and myproject/apps.py can contain the imports, etc. The nice thing there is that now we c

Re: Fixing app_label

2007-12-05 Thread Joseph Kocherhans
On 12/5/07, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Adrian Holovaty wrote: > > The settings file syntax could look like this: > > > > INSTALLED_APPS = AppCollection( > > App('django.contrib.admin'), > > App('ellington.news'), > > ) > > Why not also use actual module ob

Re: Fixing app_label

2007-12-05 Thread Ivan Sagalaev
Adrian Holovaty wrote: > The settings file syntax could look like this: > > INSTALLED_APPS = AppCollection( > App('django.contrib.admin'), > App('ellington.news'), > ) Why not also use actual module objects here instead of strings like with view functions in urlconfs? -

Re: Fixing app_label

2007-12-05 Thread Adrian Holovaty
On Dec 5, 2007 1:48 PM, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > The settings file syntax could look like this: > > INSTALLED_APPS = AppCollection( > App('django.contrib.admin'), > App('ellington.news'), > ) Whoop, I stopped short of saying this explicitly, but this is

Re: Fixing app_label

2007-12-05 Thread Adrian Holovaty
On Dec 5, 2007 11:55 AM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/ticket/3591 has been following this > problem (and the other, related ones). The patches there look > relatively good and the tests appear to pass, but I'm concerned about > the level of boat-rock

Re: Fixing app_label

2007-12-05 Thread Marty Alchin
On Dec 5, 2007 12:55 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/ticket/3591 has been following this > problem (and the other, related ones). The patches there look > relatively good and the tests appear to pass, but I'm concerned about > the level of boat-rock

Fixing app_label

2007-12-05 Thread Jacob Kaplan-Moss
Howdy folks -- I just had a nasty realization here at work: we're gonna need to fix app_label pretty damn quick. The good news is that this means we'll get to fix this problem on work time; the bad news is that I'm totally unsure how to start. For those who haven't been following along, the main