Hi, I had a problem with the admin interface and found a related issue from a trac ticket. I sent my below email to the users' list but didn't get any reply. I guess you guys here have more insight of Django and maybe can point me to the right direction? I have been struggling with this for 2 days now. I'm not sure if it's appropriate to post this message here. Do apologize if it's not. Many thanks Cliff
On Jun 7, 11:41 pm, Cliff <[EMAIL PROTECTED]> wrote: > 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 > tickethttp://code.djangoproject.com/ticket/3288 > and said to be fixed in this > changesethttp://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 developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---