I have an application that generates a list of items in a category. Therefore i have this in my urls.py:
(r'^categorie/(.*)/$', browse_page), This is my view..py: def browse_page(request, browse): browse_lijst = Nl.objects.all() menu = Menu_nl.objects.all().order_by('order') return render_to_response('p_verkoop_categorie.htm', { 'browse_lijst': browse_lijst, 'menu': menu, }, context_instance = RequestContext(request)) I have this in my template (i know this is ugly): {% ifequal x.lijst.__str__ browse.__str__ %} I tried to remove the above from the template and replace this with this in my view: def browse_page(request, browse): menu = get_list_or_404(Menu_nl, slug=browse) browse_lijst = Nl.objects.filter(lijst=browse) return render_to_response('p_verkoop_categorie.htm', { 'browse_lijst': browse_lijst, 'menu': menu, }, context_instance = RequestContext(request)) This leads to a template error: Caught an exception while rendering: Incorrect integer value: How and where should i convert the browser input into a string? -- 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.