On 8/12/2010 8:11 PM, Wendy wrote:
> Thanks so much both of you, totally works and makes sense.  I used
> Joseph's version because of the commas, but they both helped me
> understand what was happening.
> I notice that it seems to be ok to put the if statement on one line:
> 
> {% if filmmakers|length > 2 and not forloop.first %}, {% endif %}
> 
> is that generally ok, or do I want to indent everything and balance
> the if/endif statements?

That's as much a matter of personal taste as anything else. Some people
like their HTML to look pretty, but the browsers don't care. You can
omit the irrelevant whitespace in your output using the {% spaceless %}
tag - see

  http://docs.djangoproject.com/en/dev/ref/templates/builtins/#spaceless

So my own personal taste is to lay everything out for maximum ease of
understanding.

regards
 Steve
-- 
DjangoCon US 2010 September 7-9 http://djangocon.us/

-- 
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.

Reply via email to