my 2c's I don't see an explanation in the wiki page on why I should care about any of this. from what I see i just see myself doing some 'busy' work rewriting my apps to use this new method.
What does removing the magic let me do which I couldn't do before? specifically.. I'm looking for the mixin functionality present in rails. how can I add versioning? how can I add extra functions to a foreign key relationship (ala ticket #746) don't get me wrong, I'm sure there are dozen reasons, and I'm being a bit pedantic here.. but the wiki should say them ;-) regards ian On 12/7/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > Inline. > > "Simon Willison" <[EMAIL PROTECTED]> wrote > in message news:[EMAIL PROTECTED] > > > > > > On 6 Dec 2005, at 21:00, Adrian Holovaty wrote: > > > >> Thoughts? > >> > >> http://code.djangoproject.com/wiki/RemovingTheMagic > > > > I really like almost all of it. My one hang-up is this: > > > > Person.objects.get_list(Person.q.first_name == 'Adrian') > > > > I like the Person.objects bit, but I'm not so keen on > > Person.q.first_name - it's pretty verbose. > > Exactly my feelings after reading the document. I liked almost everything > but was snagged a little but by Person.q. > > > How about supporting an SQL where clause, as seen in Rails? > > > > Person.objects.get_where('first_name = %s and last_name = %s', 'Adrian', > > 'Holovaty') > > > > Escaping would have to be handled in a backend dependant way, but this > > would solve a lot of our ugly syntax problems. We could keep the old > > method around for cases where database independent SQL generation is > > needed. > > It looks like a good addition. Obviously it can be abused beyond debugging > ;-), but in simple cases (e.g., logical expressions) it is simple and > expressive. > > Thanks, > > Eugene > > > > -- [EMAIL PROTECTED] -- blog: http://feh.holsman.net/ -- PH: ++61-3-9877-0909 If everything seems under control, you're not going fast enough. - Mario Andretti