Okay, got it (at least i hope so :-) ): def article_child_gen(article): while True: try: article = Article.objects.get(parent_article=article) yield article except Article.DoesNotExist: return
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b63d9553-b566-4855-8fde-d3ab6d5fef56%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.