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 trial

Python Customizing Django Templates Building Custom Filters Final Wrap-Up

Michael Luo
Michael Luo
6,652 Points

Not passing the last task of the code challenge

I've passed the first 3 tasks for creating the simple_tag. I submit the following codes in the list.html for the last task, but cannot pass.

{% load fairy_extras %}

There {{ num_elf|conjugate_is }} {{ num_elf }} el{{ num_elf|pluralize:"f,ves" }}.

Is there anything wrong with my code? Thanks in advance for kind help.

[MOD: added ```html+jinja formatting. -cf]

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

conjugate_is is a tag (like a function) not a filter. Tags are reference as the first item in the tag with arguments following. In this case the arguments would be num=num_elf.

{% conjugate_is num=num_elf %}

Edit: Forgot to change the delimiters to {% %}

Gregory Czaplicki
Gregory Czaplicki
3,712 Points

I too struggled, but found the answer in the Django documentation.

{% conjugate_is num_elf %}
Chris Freeman
Chris Freeman
Treehouse Moderator 68,423 Points

Both answers work! Mine uses keyword argument, and yours uses positional arguments. As they say "ToMAYto ToMAHto".