ManyToMany question

2009-11-18 Thread Gretar
I'm making a game link site, where users can post links to their favorite web game. When people post games they are supposed to check what category the game falls into. I decided to allow many categories for each game since some games can fall into many categories. So the question is, how do I han

Re: ManyToMany Question

2009-06-11 Thread Daniel Roseman
On Jun 11, 1:06 pm, LeeRisq wrote: > Programming with Django is unfortunately my job on the side right now, > so limited time for coding and testing. I know I could answer this > question myself by tinkering around, but don't have time. > > When you have a generic ManyToMany field specified betwe

ManyToMany Question

2009-06-11 Thread LeeRisq
Programming with Django is unfortunately my job on the side right now, so limited time for coding and testing. I know I could answer this question myself by tinkering around, but don't have time. When you have a generic ManyToMany field specified between two models, will Django automatically crea

Yet another ManyToMany question ...

2007-02-20 Thread ZebZiggle
I have a model: class Employee(models.Model): name = models.CharField(maxlength = 100) reportsTo = models.ForeignKey('self', null=True, related_name='dependent_element') subordinates = models.ManyToManyField('self') I want to add the employee as a subordinate when the manager is defi

Re: ManyToMany Question

2006-05-28 Thread chrisk
{{ post.assoc_cats.all|join:", " }} does the right thing. Thank you. BTW: The RemovingTheMagic Document says change __repr__ to __str__ so i've done it. IMO it's a bit confusing. --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: ManyToMany Question

2006-05-27 Thread Ivan Sagalaev
chrisk wrote: >class Post(models.Model): >... > assoc_cats = models.ManyToManyField(Category) >... > >In my template {% for post in latest %}... works fine, but if i try to >use the Many-to-many related lookup {{ post.assoc_cats.all }} i get an >empty list. > > I wast about to answer somethin

Re: ManyToMany Question

2006-05-27 Thread Jay Parlar
On 5/27/06, chrisk <[EMAIL PROTECTED]> wrote: > > Hi * > > I'm on trunk and using 'CookBookCategoryDataModelPostMagic'. > > In my models file i have this: > > class Post(models.Model): > ... >assoc_cats = models.ManyToManyField(Category) > ... > > In my template {% for post in latest %}... wor

ManyToMany Question

2006-05-27 Thread chrisk
Hi * I'm on trunk and using 'CookBookCategoryDataModelPostMagic'. In my models file i have this: class Post(models.Model): ... assoc_cats = models.ManyToManyField(Category) ... In my template {% for post in latest %}... works fine, but if i try to use the Many-to-many related lookup {{ post