atom feed4 messages in com.googlegroups.django-usersTemplate error "Could not parse the r...
FromSent OnAttachments
SpiderJul 12, 2006 9:09 am 
James BennettJul 12, 2006 9:19 am 
Brett ParkerJul 12, 2006 9:32 am 
SpiderJul 12, 2006 9:37 am 
Subject:Template error "Could not parse the remainder"
From:Spider (
Date:Jul 12, 2006 9:09:22 am

I have this loop in a template : {% for s in p.schedule_set.all() %}

The template engine complains with "Could not parse the remainder: ()"

Here p is a Plan object instance. Schedule has Plan as a many-to-one foreign key (each Plan has 1 or more Schedules).

What I want is to loop through all the Schedules associated with this Plan. I know that p.schedule_set.all() gives me this, so I guess this is a limitation of the template parser. Is there a way to achieve what I want?

I did think of doing the p.schedule_set.all() in my view and passing the result in, but there problem is that there is a further level of nesting - each schuled consist of a number of visits, so notionally what I want is nested loops : {% for s in p.schedule_set.all() %} {% for v in s.visit_set.all() %}

I suppose I could pass in nested dictionaries from the view ...