Re: magic-removal: "Change subclassing syntax"

2006-02-02 Thread Carlo C8E Miron
Ciao Joseph! 2006/2/1, Joseph Kocherhans <[EMAIL PROTECTED]>: > Beacuse I don't use INNER JOIN often enough for it to be readily > accessible in my brain ;-) You're right though, INNER JOIN makes more > sense. (I would hope that it performs better accross every supported > db engine, but who knows

Re: magic-removal: "Change subclassing syntax"

2006-02-01 Thread Joseph Kocherhans
On 2/1/06, Carlo C8E Miron <[EMAIL PROTECTED]> wrote: > 2006/1/26, Joseph Kocherhans <[EMAIL PROTECTED]>: > > > I'm writing up a draft of this right now. I'll post it sometime today. > > http://code.djangoproject.com/wiki/ModelInheritance > > referring to 2. Modeling joins in SQL, why did you use

Re: magic-removal: "Change subclassing syntax"

2006-02-01 Thread Carlo C8E Miron
2006/1/26, Joseph Kocherhans <[EMAIL PROTECTED]>: > > I'm writing up a draft of this right now. I'll post it sometime today. > http://code.djangoproject.com/wiki/ModelInheritance referring to 2. Modeling joins in SQL, why did you use LEFT JOIN instead of INNER JOIN? as subtypes inherits from super

Re: magic-removal: "Change subclassing syntax"

2006-01-27 Thread John Szakmeister
On Wednesday 25 January 2006 18:15, Daniel Poelzleithner wrote: > Jeremy Dunck wrote: > > This makes me think the world needs a wiki whose wikitext syntax is > > restructured text. > > In general ? > At least trac has a macro for restructured text I think. Yes, it does: http://projects.edgewall

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Robert Wittams
Joseph Kocherhans wrote: > Is this a good summary of the current thinking on subclassing? > > http://groups.google.com/group/django-developers/browse_frm/thread/ea5e0bf903058fac/9a68ac0d99cb6d7d?q=semantics&rnum=1#9a68ac0d99cb6d7d > > The wiki doesn't say a whole lot about it, although it's prob

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Joseph Kocherhans
On 1/26/06, Robert Wittams <[EMAIL PROTECTED]> wrote: > > I think all that is needed here is education - it needs to be pointed > out what the costs of subtyping are. I agree. I think most of the time the join is going to be simple anyhow... take comments for instance. Say I have a Comment class

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Robert Wittams
Maniac wrote: > > Joseph Kocherhans wrote: > >> http://code.djangoproject.com/wiki/ModelInheritance >> >> This is still really rough. I hope I didn't leave too much out. Let >> the arguing commence ;-) >> >> > If the last bit ("Change the current usage of subclassing") is only > about removing

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Robert Wittams
> app_objects = managers.PolymorphicManager(Place, Restaurant, > ItalianRestaurant) > `` > > This also makes it explicit which classes are participating in a join, > rather than potentially joining a large number of installed model classes. > Thus making it completely unnatural to inherit from

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Max Battcher
Maniac wrote: Jacob Kaplan-Moss wrote: If I ask for places, give me a list of places and don't bother looking up restaurants. So:: ``place_instance.description`` should raise an ``AttributeError`` regardless if weather or not it is actually a restaurant. Why? This is not how duck typ

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Robert Wittams
Jacob Kaplan-Moss wrote: > 1. Modeling parent relations in SQL: #3 seems to make the most sense > for me -- I can't think of a case in a one2one where the child id would > need to differ from the parent id. Also:: > > CREATE TABLE "myapp_restaurant" ( > "id" integer NOT NULL PRIMA

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Maniac
Joseph Kocherhans wrote: http://code.djangoproject.com/wiki/ModelInheritance This is still really rough. I hope I didn't leave too much out. Let the arguing commence ;-) If the last bit ("Change the current usage of subclassing") is only about removing inherited attributes why not do it th

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Maniac
Jacob Kaplan-Moss wrote: If I ask for places, give me a list of places and don't bother looking up restaurants. So:: ``place_instance.description`` should raise an ``AttributeError`` regardless if weather or not it is actually a restaurant. Why? This is not how duck typing works all ov

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Jacob Kaplan-Moss
On Jan 26, 2006, at 12:26 PM, Joseph Kocherhans wrote: http://code.djangoproject.com/wiki/ModelInheritance Thanks for doing this, Joseph! It looks really good, too, but here are the (inevitable) nitpicks: 1. Modeling parent relations in SQL: #3 seems to make the most sense for me -- I c

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Joseph Kocherhans
On 1/26/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > On 1/25/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > > On 1/25/06, Jason Davies <[EMAIL PROTECTED]> wrote: > > > I think that's the best we've got. Is it worth creating a wiki page? > > > > Yeah, let's collect the design decisions

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Joseph Kocherhans
On 1/25/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 1/25/06, Jason Davies <[EMAIL PROTECTED]> wrote: > > I think that's the best we've got. Is it worth creating a wiki page? > > Yeah, let's collect the design decisions and code examples on a wiki page. I'm writing up a draft of this ri

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Antonio Cavedoni
On 26 Jan 2006, at 0:02, Jeremy Dunck wrote: This makes me think the world needs a wiki whose wikitext syntax is restructured text. Anybody know of one? Apparently you can use ReST with MoinMoin: http://moinmoin.wikiwikiweb.de/HelpOnParsers/ReStructuredText It’s not the native wikitext, bu

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Jeremy Dunck
On 1/25/06, Max Battcher <[EMAIL PROTECTED]> wrote: > I've seen a home-brew Zope-based one. It would be real quick to build > one as a django app... In fact its own my personal project todo list. > How soon do you want it? :-) Mine, too, but you may get to it first. As Soon As Our Copious Fre

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Max Battcher
Joseph Kocherhans wrote: The wiki doesn't say a whole lot about it, although it's probably in someone's brain ;) I'm wondering about the ETA of this as well. I could use a good subclassing system for my project *today*, particularly because as far as I can tell the One-To-One relationship i

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Max Battcher
Jeremy Dunck wrote: This makes me think the world needs a wiki whose wikitext syntax is restructured text. Anybody know of one? I've seen a home-brew Zope-based one. It would be real quick to build one as a django app... In fact its own my personal project todo list. How soon do you want

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Daniel Poelzleithner
Jeremy Dunck wrote: > This makes me think the world needs a wiki whose wikitext syntax is > restructured text. In general ? At least trac has a macro for restructured text I think. kindly regards daniel

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Jeremy Dunck
On 1/25/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 1/25/06, Jason Davies <[EMAIL PROTECTED]> wrote: > > I think that's the best we've got. Is it worth creating a wiki page? > > Yeah, let's collect the design decisions and code examples on a wiki page. This makes me think the world nee

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Adrian Holovaty
On 1/25/06, Jason Davies <[EMAIL PROTECTED]> wrote: > I think that's the best we've got. Is it worth creating a wiki page? Yeah, let's collect the design decisions and code examples on a wiki page. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Jason Davies
Joseph Kocherhans wrote: > Is this a good summary of the current thinking on subclassing? > > http://groups.google.com/group/django-developers/browse_frm/thread/ea5e0bf903058fac/9a68ac0d99cb6d7d?q=semantics&rnum=1#9a68ac0d99cb6d7d > > The wiki doesn't say a whole lot about it, although it's proba

magic-removal: "Change subclassing syntax"

2006-01-25 Thread Joseph Kocherhans
Is this a good summary of the current thinking on subclassing? http://groups.google.com/group/django-developers/browse_frm/thread/ea5e0bf903058fac/9a68ac0d99cb6d7d?q=semantics&rnum=1#9a68ac0d99cb6d7d The wiki doesn't say a whole lot about it, although it's probably in someone's brain ;) Joseph