NameError at /account/signup/

30 views
Skip to first unread message

Noyon Barman

unread,
Mar 12, 2021, 5:41:40 PM3/12/21
to Django users
I can't fix it, anyone please suggest to me.
Thanks in advance 
Name Error.PNG
Server.PNG

Eduardo Agreda López

unread,
Mar 12, 2021, 6:48:24 PM3/12/21
to Django users
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.

Fiifi Pius

unread,
Mar 12, 2021, 6:48:24 PM3/12/21
to django...@googlegroups.com
It's like you are not importing your sign up form

On Fri, Mar 12, 2021, 10:42 PM Noyon Barman <noyonba...@gmail.com> wrote:
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d79e07cc-4d37-4833-815d-e6c107a88e97n%40googlegroups.com.

Mohammad Anarul

unread,
Mar 13, 2021, 6:33:13 AM3/13/21
to django...@googlegroups.com
You did not import the signup form. So showing errors

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages