I have a ChoiceField in my form class, presumably a list of users. How do I prepopulate this with a list of users from my User model?
What I have now is:
class MatchForm(forms.Form): choices = tuple(User.objects.all().values_list()) user1_auto = forms.CharField() user1 = forms.ChoiceField(choices=choices) user2_auto = forms.CharField() user2 = forms.ChoiceField(choices=choices)
This should work.