﻿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 = ""<ul><!-- render called -->\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 += '</ul><!-- end of render -->\n'
    return res
  
  def __get_childrens(self, res, parent):
    res += '<!-- %s (inside __get_childrens) -->\n' % parent.name
    return res
}}}


'''What i should get:'''
{{{
<ul><!-- start get_first -->
<!-- Geek stuff -->
<!-- Left to die -->
<!-- Personal -->
<!-- School -->
</ul><!-- end get_first -->
}}}

'''The output i get when using my custom template tag:'''
{{{
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->
<ul><!-- start get_first -->

<ul><!-- start get_first -->
<!-- Geek stuff -->
<!-- Left to die -->
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->
<!-- Left to die -->
<!-- Personal -->
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->

<!-- Left to die -->
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->
<ul><!-- start get_first -->
<ul><!-- start get_first -->
<!-- Geek stuff -->
<!-- Left to die -->
<!-- Personal -->
<!-- School -->
</ul><!-- end get_first -->
}}}"	defect	closed	Template system		major	invalid			Unreviewed	0	0	0	0	0	0
