Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKeith Whatling
17,759 Pointscustomising Django templates flavors of ice cream |length
I am having issues with the questions on this new django course Customizing Django Templates, despite my answers working elsewhere I cant for the life of me get them to work on the tests.
{{ flavors.step_set.all|length }} should work, anyone got any ideas?
<html>
<head>
<title>Ice Cream</title>
</head>
<body>
<div>We have {{ flavors.step_set.all|length }} flavors today.</div>
<ul>
</ul>
</body>
</html>
3 Answers
Seth Reece
32,867 PointsHi Keith,
According to this post you want to use:
{{ flavors|length }}
I only got that to pass by deleting the comment:
<!-- YOUR CODE HERE -->
I'll agree that it's a little confusing seeing as the course used the same code you tried.
Keith Whatling
17,759 PointsYes the tutorial goes over step_set and it would seem as though that would be correct. not the clearest questions in this course. #BringBackKennith
Chris Christensen
9,281 PointsI'll second that one. There is nothing in the course that points to this being the answer.