class Parent(Model): ... class Child(Model) parent = ForeignKey(Parent) ...
I want to list all parents along with first related child.
class Parent(Model): ... class Child(Model) parent = ForeignKey(Parent) ...
def append(num, to=[]): to.append(num) return to aa = append(1) print aa bb = append(2) print bb