id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux
475 Recursive function calling not working properly in template tags espen@… Adrian Holovaty "'''In templatetags/blog_tags.py:'''
{{{
class GetCategoriesList(template.Node):
def render(self, context):
res = ""
\n""
# getting all elements that got no parent
base_list = categories.get_list(parent__isnull=True)
for base_element in base_list:
res += self.__get_childrens(res, base_element)
res += '
\n'
return res
def __get_childrens(self, res, parent):
res += '\n' % parent.name
return res
}}}
'''What i should get:'''
{{{
}}}
'''The output i get when using my custom template tag:'''
{{{
}}}" defect closed Template system major invalid Unreviewed 0 0 0 0 0 0