[Answer]-Django: No of Instances of a Foreign Key

1👍

Something like this (take a look at the official Django docs about many-to-one relationships):

def num_of_choices(question):
    return question.choice_set.count()
👤inejc

Leave a comment