Friday, March 12, 2021

Re: NameError at /account/signup/

Do you have create the SingUpForm. If you use Django auth model, can you create the forms.py file and  import this path:

from django.contrib.auth.forms import UserCreationForm 
from django.contrib.auth.models import User

inside of the forms.py file create the SingUpForm class and extends of the UserCreationForm module, example:

class SignUpForm(UserCreationForm): 
      class Meta
          model = User 
          fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2', )

Before, in your sign_up view, import you SingUpForm.

El viernes, 12 de marzo de 2021 a las 16:41:40 UTC-6, noyonba...@gmail.com escribió:
I can't fix it, anyone please suggest to me.
Thanks in advance 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/422bb634-0371-43a0-8f8a-2f5dcfdf93a9n%40googlegroups.com.

No comments:

Post a Comment