Q:

What does "children__" mean in Django? Where is it documented?

I am trying to parse this Django code (without any familiarity with Django, I might add)
Question.objects.filter(children__marked=True)

I know the model contains a table called "forum_node" with one of the column named "marked". From what I understand, this statement fetches all the questions where any of its children (= answers) are accepted (or "marked"). How does this magic work?

A:

To understand what happens you should take a closer look at Django's docs explaining the query options and the object-relational mapping.
children refers to a related model (there should be an according m2m or foreign key field named children on your question model, indicating the related model, e.g. node) and marked is a field on the related model. 

