Re: Model inheritance API

2006-07-23 Thread Ivan Sagalaev
First of all: Malcolm, this looks damn cool and very well thought out! Thank you! Malcolm Tredinnick wrote: > --- > 2. "Pythonic" Inheritance > > ... > > (in the above classes, Animal > would have a foreign key reference to the Thing table, s

Re: Model inheritance API

2006-07-23 Thread Malcolm Tredinnick
On Sun, 2006-07-23 at 13:02 +0400, Ivan Sagalaev wrote: > First of all: Malcolm, this looks damn cool and very well thought out! > Thank you! Thanks. > > Malcolm Tredinnick wrote: > > --- > > 2. "Pythonic" Inheritance > > > > ... > > > > (i

Re: User subclassing

2006-07-23 Thread Kenneth Gonsalves
On 22-Jul-06, at 11:04 PM, Todd O'Bryan wrote: >> >> Again, having the solution with OneToOne relation scares newbies away >> because it's become a kind of common wisdom that OneToOne will be >> changed very drastically very soon and "all your code would burn". > > What is the current wisdom on

Re: 2401: strings escaping translation

2006-07-23 Thread Kenneth Gonsalves
On 23-Jul-06, at 7:18 AM, Bill de hÓra wrote: > http://code.djangoproject.com/ticket/2401 > > "strings escaping translation" > > The strings that stay in english aren't in the tamil .po file. I > think > the .po files might be out of sync with the source tree and that > bin/make-messages.py n

Re: Model inheritance API

2006-07-23 Thread Bill de hÓra
Malcolm Tredinnick wrote: > --- > 1. Abstract Base class > --- > [...] >For example, > > class Thing(models.Model): >name = models.CharField(...) > > class Animal(Thing): >genus = models.CharField(...) >

Re: 2401: strings escaping translation

2006-07-23 Thread Bill de hÓra
Kenneth Gonsalves wrote: > not sure where the tamil guys took the po file from - but since i > noticed the same thing in german also, i think that the strings in > question are not marked with _() The strings we're talking about are in the contrib.auth module. So I checked and they're all m

Re: Model inheritance API

2006-07-23 Thread Jacob Kaplan-Moss
On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote: > Rather than watch the "inherit from User" thread go round and round, > maybe I should give people something more concrete to think about. W00t -- I'm about +1,000 on your proposal; it's well-thought-out, clean, and seems to hit all the ri

Re: Model inheritance API

2006-07-23 Thread Malcolm Tredinnick
On Sun, 2006-07-23 at 17:12 +0100, Bill de hÓra wrote: > Malcolm Tredinnick wrote: > > > --- > > 1. Abstract Base class > > --- > > [...] > >For example, > > > > class Thing(models.Model): > >name = models.CharField(...) > > >

Re: Model inheritance API

2006-07-23 Thread Malcolm Tredinnick
On Sun, 2006-07-23 at 11:31 -0500, Jacob Kaplan-Moss wrote: > On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote: [...] > > > (1) What notation to use to declare a class as abstract? I've > > thrown out > > Meta.is_abstract -- any preference for alternatives? > > Bill de hÓra suggests ``mod

Re: humanized dates

2006-07-23 Thread Adrian Holovaty
On 7/22/06, jws <[EMAIL PROTECTED]> wrote: > The humanize middleware should probably handle pretty-printing dates as > well. It should also reflect I18N, if possible. I don't see a need for this, considering Python's built-in strftime() method is capable of formatting date objects as text. Also,

Re: [Django] #2406: [patch] new command for management -- runjobs

2006-07-23 Thread Ian Holsman
how is this outside the scope?this patch doesn't implement 'cron' or anything like that.it just makes it easier to define jobs which the application needs run on a regular basistake your django/bin/daily_cleanup.py instead of having it defined there it would be definedin contrib/sessions/management

Re: Model inheritance API

2006-07-23 Thread Russell Keith-Magee
First off: +1 and then some from me - this is some great stuff, Malcolm. On 7/24/06, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote:On Sun, 2006-07-23 at 11:31 -0500, Jacob Kaplan-Moss wrote: > On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote:[...]>> > (1) What notation to use to declare a clas

Re: [Django] #2406: [patch] new command for management -- runjobs

2006-07-23 Thread James Bennett
On 7/23/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > how is this outside the scope? As I said on IRC, I don't really feel like handling background maintenance jobs is something that's in scope for a web application framework. If an application needs periodic maintenance, it's easy enough to wrap

Re: [Django] #2406: [patch] new command for management -- runjobs

2006-07-23 Thread Adrian Holovaty
On 7/23/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > this patch doesn't implement 'cron' or anything like that. > it just makes it easier to define jobs which the application needs run on a > regular basis If your goal is to cut crontab entries from five to one, just create a single script that d

Re: [Django] #2406: [patch] new command for management -- runjobs

2006-07-23 Thread Ian Holsman
On 24/07/2006, at 11:34 AM, Adrian Holovaty wrote:On 7/23/06, Ian Holsman <[EMAIL PROTECTED]> wrote: this patch doesn't implement 'cron' or anything like that.it just makes it easier to define jobs which the application needs run on aregular basis If your goal is to cut crontab entries from five to

Re: Model inheritance API

2006-07-23 Thread Bryan
+1 This is great, Malcom, and a step forward to my comments/goals/rants in the other thread. Russell Keith-Magee wrote: > 2) A decorator: > > @models.Abstract > class Thing(models.Model): >... > When did python support class decorators? Jacob Kaplan-Moss wrote: > ... I like seeing that a m

Re: Model inheritance API

2006-07-23 Thread Russell Keith-Magee
On 7/24/06, Bryan <[EMAIL PROTECTED]> wrote: Russell Keith-Magee wrote:> 2) A decorator:When did python support class decorators?You know... one of these days, I'm going to learn to have coffee before I touch a keyboard :-) You are correct - the @ syntax doesn't work for classes. However, that does