thanks
The error is:
class Meta:
with capital letter.
Thank you!
質問
I'm trying to create a form with only some fields to modify from the django user model, but when i try this code:
class UserEditForm(forms.ModelForm):
class meta:
model = User
fields = ['first_name', 'last_name',]
and i do:
user_db = User.objects.get(pk=u_id)
user_form = UserEditForm(instance=user_db)
i get an empty form. Any ideas?
Thank you!
解決
thanks
The error is:
class Meta:
with capital letter.
Thank you!