1👍
The model field is Post.user
, but your form field PostForm.selectuser
. Try using user
in the PostForm
.
class PostForm(forms.ModelForm):
user = forms.ModelChoiceField(queryset=User.objects.all())
...
Source:stackexchange.com
1👍
The model field is Post.user
, but your form field PostForm.selectuser
. Try using user
in the PostForm
.
class PostForm(forms.ModelForm):
user = forms.ModelChoiceField(queryset=User.objects.all())
...