Hi,

In the views.py for my app I have the following:

def index(request):
    categories = models.Category.objects.all()
    return render_to_response("forum/index.html",
{'categories':categories})

And in the template file I am trying to iterate through these via
doing:

{% for category in categories %}

But every time I try this I get an exception saying: 'RelatedManager'
object is not iterable.

I was under the impression that the output from obkects.all() was
iterable?

I would appreciate any help anyone can give.

Thanks

--~--~---------~--~----~------------~-------~--~----~
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@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to