Skip to content

Instantly share code, notes, and snippets.

@hseritt
Created February 25, 2017 13:00
Show Gist options
  • Save hseritt/2684cbed2feec6a06281b0d8eb048408 to your computer and use it in GitHub Desktop.
Save hseritt/2684cbed2feec6a06281b0d8eb048408 to your computer and use it in GitHub Desktop.
Django ModelMultipleChoiceField and ModelChoiceField and not required
members = forms.ModelMultipleChoiceField(
queryset=User.objects.all().order_by('username'), required=False)
lead_user = forms.ModelChoiceField(
queryset=User.objects.all().order_by('username'), required=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment