RE: ManyToMany problem

2011-09-29 Thread James DeMichele
*Subject:* Re: ManyToMany problem Thanks, Tom. So, I've changed my code slightly.but I'm still getting an error. I'm pretty much following exactly what is in the Django docs as well. I'm wondering if it's because I have my models in different modules. That shouldn&

Re: ManyToMany problem

2011-09-29 Thread James DeMichele
Thanks, Tom. So, I've changed my code slightly.but I'm still getting an error. I'm pretty much following exactly what is in the Django docs as well. I'm wondering if it's because I have my models in different modules. That shouldn't matter though should it? Maybe I'm doing something wrong with

RE: ManyToMany problem

2011-09-29 Thread James DeMichele
like it fails. Is this a bug? Thanks. -Jamie -Original Message- From: James DeMichele [mailto:james.demich...@redfin.com] Sent: Thursday, September 29, 2011 11:21 AM To: django-users@googlegroups.com Subject: RE: ManyToMany problem Thanks for the response, that's a completely in

Re: ManyToMany problem

2011-09-29 Thread Tom Evans
On Thu, Sep 29, 2011 at 5:20 PM, James DeMichele wrote: > Thanks for the response, that's a completely inaccurate statement. > > Here's an example from the Django docs: > > https://docs.djangoproject.com/en/1.3/topics/db/models/#intermediary-manyt > omany > > The Group object has through="Membersh

RE: ManyToMany problem

2011-09-29 Thread James DeMichele
s@googlegroups.com Subject: Re: ManyToMany problem I don't think you can make the 'through' argument a string, and I don't think there's circular dependency issue with the 'through' kwarg. -- You received this message because you are subscribed to the Google Groups

Re: ManyToMany problem

2011-09-29 Thread Shawn Milochik
I don't think you can make the 'through' argument a string, and I don't think there's circular dependency issue with the 'through' kwarg. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

ManyToMany problem

2011-09-29 Thread James DeMichele
Hello, I have created my own ManyToMany table, but am getting an error when I attempt to get a related item from one of my Models. Any insight would be greatly appreciated. I am on Django 1.3.1. *models/restuarant_hood_map.py* class RestaurantHoodMap(models.Model): restaurant = models.For

Re: ManyToMany problem

2011-02-18 Thread Amar
Thank you, it solved this problem :) Now, I've encountered another issue, which you can see below. When using only single item in annotation it works, but when using two, it returns the same result. I've added default ordering in all of my models, and as you can se, I've tried including it directl

Re: ManyToMany problem

2011-02-17 Thread Karen Tracey
On Thu, Feb 17, 2011 at 5:01 AM, Amar wrote: > OK, I've created a barebone app which shows this problem, so if anyone > can try this and duplicate, I'll report this as a bug (unless there is > a problem wih my code) > You can get it here http://rapidshare.com/files/448393624/problem.zip > > I'm u

Re: ManyToMany problem

2011-02-17 Thread Amar
OK, I've created a barebone app which shows this problem, so if anyone can try this and duplicate, I'll report this as a bug (unless there is a problem wih my code) You can get it here http://rapidshare.com/files/448393624/problem.zip I'm using PostgreSQL database, so change accordingly (unless it

ManyToMany problem

2011-02-16 Thread Amar
Hi, I have a problem with accessing items using ManyToMany relationship. Here is a sample from shell: >>> parts = Event.objects.all()[0].participants.all() >>> parts [, ] >>> parts[0] >>> parts[1] >>> for p in parts: ... print p ... P1 P2 I cant figure out why accessing parts[0] and parts[1

Re: ManyToMany problem

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 4:18 PM, MartinBorthiry wrote: > > > > On May 27, 6:11 pm, Alex Gaynor wrote: > > On Wed, May 27, 2009 at 4:07 PM, MartinBorthiry > > wrote: > > > > > > > > > > > > > Hello, > > > > > I have this model with a manyToMany relationship: > > > > > class Group(BaseClass): > >

Re: ManyToMany problem

2009-05-27 Thread MartinBorthiry
On May 27, 6:11 pm, Alex Gaynor wrote: > On Wed, May 27, 2009 at 4:07 PM, MartinBorthiry > wrote: > > > > > > > Hello, > > >  I have this model with a manyToMany relationship: > > >  class Group(BaseClass): > >   ... > >    members = models.ManyToManyField > > (Client ,through='Membership',rela

Re: ManyToMany problem

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 4:07 PM, MartinBorthiry wrote: > > Hello, > > I have this model with a manyToMany relationship: > > class Group(BaseClass): > ... >members = models.ManyToManyField > (Client ,through='Membership',related_name="members" > , blank=

ManyToMany problem

2009-05-27 Thread MartinBorthiry
Hello, I have this model with a manyToMany relationship: class Group(BaseClass): ... members = models.ManyToManyField (Client ,through='Membership',related_name="members" , blank=True) . class Membership(BaseClass): client = models.Forei

Re: ManyToMany problem

2009-01-09 Thread knight
Thanks, Meir. On Jan 7, 11:24 am, mksoft wrote: > Hi Alex, > > On Jan 4, 12:27 pm, knight wrote: > > > > > Hi, > > > I have the following problem: > > I have models.py with the following class: > > > class Section(Feed): > >     parent = models.ManyToManyField('self', blank=True, null=True) > >

Re: ManyToMany problem

2009-01-07 Thread mksoft
Hi Alex, On Jan 4, 12:27 pm, knight wrote: > Hi, > > I have the following problem: > I have models.py with the following class: > > class Section(Feed): >     parent = models.ManyToManyField('self', blank=True, null=True) >     depth = models.IntegerField(editable=False) >     def save(self): >

ManyToMany problem

2009-01-04 Thread knight
Hi, I have the following problem: I have models.py with the following class: class Section(Feed): parent = models.ManyToManyField('self', blank=True, null=True) depth = models.IntegerField(editable=False) def save(self): self.depth = 1 if self.parent: self