def __init__(self, data=None): """Initialize the form and set the list of choices for the 'big_brother' field.""" super(UserForm, self).__init__(data=data) self.fields['big_brother'].choices = get_all_big_bro_choices()
def __init__(self, data=None, instance=None): """Initialize the form and set the list of choices for the 'big_brother' field.""" super(EditProfileForm, self).__init__(data=data, instance=instance) self.fields['big_brother'].choices = get_all_big_bro_choices()