Just to throw in another variable. The recursion comes from file
django/db/models.py in method get_follow:
    def get_follow(self, override=None):
        follow = {}
        for f in self.fields + self.many_to_many +
self.get_all_related_objects():
            if override and f.name in override:
                child_override = override[f.name]
            else:
                child_override = None
            fol = f.get_follow(child_override)
            if fol != None:
                follow[f.name] = fol
        return follow
The same issue was reported in this ticket 
http://code.djangoproject.com/ticket/3288
and said to be fixed in this changeset 
http://code.djangoproject.com/changeset/7477#file19

Please if someone can throw some insight? Really appreciate your help.
Cliff

On Jun 7, 6:28 pm, Cliff <[EMAIL PROTECTED]> wrote:
> Hi,
> This is the simplified version of my code:
> class Test(models.Model):
>     parent = models.ForeignKey('self',edit_inline=models.TABULAR)
>
> and the error I got:
> RuntimeError: maximum recursion depth exceeded
>
> I can understand that's because it's doing recursive for the child
> object, grand child object and so on until it reaches the upper limit
> of recursion. What I really want to do is just one level of recursion,
> so I get a structure of the following if know what I mean:
> test(parent)
> --test1(child)
> --test2(child)
> --test3(child)
>
> Is there a way to achieve this?
> Thanks
> Cliff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to