Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Russell Keith-Magee
On 2/16/06, Brett Hoerner <[EMAIL PROTECTED]> wrote: ---class Tag(meta.Model):  person = meta.ManyToManyField(Person, blank=True, null=True)This is what I meant about the bidirectional query problem - in 0.91/trunk ManyToMany fields can only be traversed in the direction they are defined - in this

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Brett Hoerner
I've tried: people.get_list(lat__gte=minlat, lon__gte=minlon, lat__lte=maxlat, lon__lte=maxlon, tags__value__exact='django') TypeError: got unexpected keyword argument 'tags__value__exact' And: people.get_list(lat__gte=minlat, lon__gte=minlon, lat__lte=maxlat, lon__lte=maxlon, tag__value__exac

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Russell Keith-Magee
On 2/16/06, Brett Hoerner <[EMAIL PROTECTED]> wrote: Not sure if anyone will see this now that it's off the front page, butheres what I've gathered so far:Sorry - I meant to answer this one yesterday, but I got distracted. I don't think the Django DB API can handle many2many stuff (at leastright no

Re: Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-15 Thread Brett Hoerner
Not sure if anyone will see this now that it's off the front page, but heres what I've gathered so far: I don't think the Django DB API can handle many2many stuff (at least right now) As for question 2, apparently you _can_ import a model in itself, so problem solved. Thanks to bitprophet on IRC

Raw SQL to Django API Question and a ManyToMany Model Question

2006-02-14 Thread Brett Hoerner
Working on a last-minute mapping app for PyCon here, I'm currently using a raw SQL query to SELECT information from People (Model) who all share the same Tag (Model in a ManyToMany with People). I'm feeding the query a range of lat/lon and the tag I want, c = db.cursor() c.execute("""sel