On Dec 7, 4:35 pm, rvandam <het.oos...@gmail.com> wrote: > Sorry for the confusion. Here are both complete models: > > class Nl(models.Model): <snip> > lijst = models.ForeignKey('Menu_nl') > type = models.ForeignKey('Type_nl') > perceel = models.ForeignKey('Perceel_nl') > plaatshuur = models.ForeignKey('Plaatshuur_nl') <snip>
> class Menu_nl(models.Model): > categorie = models.CharField(max_length=50) > order = models.IntegerField() > slug = models.SlugField() OK now we're getting somewhere. So, as I understand it, the problem is this bit of code you posted way back in the first message: def browse_page(request, browse): menu = get_list_or_404(Menu_nl, slug=browse) browse_lijst = Nl.objects.filter(lijst=browse) What you're doing here is comparing 'browse', a string, with the 'lijst' field, which is a Menu_nl object. Obviously, they don't match. Presumably what you actually want to match is the *slug* field of the Menu_nl object. Which is easy: browse_lijst = Nl.objects.filter(lijst__slug=browse) Does that solve your problem? -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.