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 trialChris Komaroff
Courses Plus Student 14,198 Pointsregister.simple_tag(newest_course) - don't put quotes around newest_course
If you want to register newest_course tag the long way, this does not work:
register.simple_tag('newest_course')
Must pass the function name, not a string, this will work:
register.simple_tag(newest_course)
Just FYI in case anyone tries to long way and gets stuck.
1 Answer
Chris Komaroff
Courses Plus Student 14,198 PointsMinor error at 4:16. Lacey introduces a long way to register a custom tag, register.simple_tag(newest_course), then quickly erases that and uses a short way, a decorator @register.simple_tag instead. I just wanted to experiment with the long way but found it did not work unless I removed quotes from around newest_course.
Steven Parker
231,248 PointsSteven Parker
231,248 PointsWhat influenced you to post this? Is there an error in the video?