[Fixed]-How to render multiple forms – radiobuttons for answers

1👍

A Django form field choices argument should be an iterable of 2-tuples, see https://docs.djangoproject.com/en/1.9/ref/models/fields/#choices

You probably want to say something like

choice_list = [(x.id, x.text) for x in question.get_answers_list()]

Your exception 'Answer' object is not iterable is because Django is trying to iterate over this 2-tuple, but finding instead the Answer object.

Leave a comment