Re: ManyToManyField select only results that match

2013-08-21 Thread Tom Lockhart
On 2013-08-21, at 7:25 AM, Gerd Koetje wrote: > He Thomas, ur right i didnt explain myself very well. > > > What im trying todo is this. > > I have a mode that holds all my form field values in difrant group , name: > Keuzes > Now i want to populate multiple form fields with these values b

Re: ManyToManyField select only results that match

2013-08-21 Thread Gerd Koetje
He Thomas, ur right i didnt explain myself very well. What im trying todo is this. I have a mode that holds all my form field values in difrant group , name: Keuzes Now i want to populate multiple form fields with these values based on wich groep i want them to be. I onloy seem to get this t

Re: ManyToManyField select only results that match

2013-08-21 Thread Tom Lockhart
On 2013-08-21, at 3:46 AM, Gerd Koetje wrote: > anyone willing to help out? I was confused by your original example, talking about a form but then showing just one field in a model definition. So I was waiting to learn something from a knowledgable response. Instead you are stuck with my gues

Re: ManyToManyField select only results that match

2013-08-21 Thread Gerd Koetje
anyone willing to help out? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to djang

Re: ManyToManyField select only results that match

2013-08-20 Thread Gerd Koetje
mm that seems to not work when i do it on multiple field kleurogen = models.ManyToManyField(Keuzes, blank=True, null=True) kleurhaar = models.ManyToManyField(Keuzes, blank=True, null=True) django.core.management.base.CommandError: One or more models did not validate: profielen.profielen: Acces

Re: ManyToManyField select only results that match

2013-08-20 Thread Gerd Koetje
i think i got it, i was foing it at the wrong spot. i added this to my forms.py kleurogen = forms.ModelMultipleChoiceField(queryset=Keuzes.objects.filter(groep_id= 'kleurogen')) works like a charm -- You received this message because you are subscribed to the Google Groups "Django users" gr

ManyToManyField select only results that match

2013-08-20 Thread Gerd Koetje
Hi all, I got a form where i use a manytomany field likes this kleurogen = models.ManyToManyField(Keuzes, blank=True, null=True) This works fine but takes all the results from Keuzes How can i only get the results from Keuzes that have the groep 'kleurogen' i tried this but it doesnt work kle