I am trying to create a ModelForm with the following code snippet. I get this error. The str object does not have a META attribute. Why is this? Thanks
In my_app / forms.py
from django.contrib.auth.models import User from django.forms import ModelForm class UserProfileForm(ModelForm): class Meta: model = User
In may_app / views.py
def u(request): form = UserProfileForm() return render('/projects/templates/form.html',{'form':form})
source share