I'm not exactly sure what is happening with your models but a few places to 
investigate are these:

Since you are using `AbstractBaseUser` rather than `AbstractUser`:

* Looking at your code it seems like you missed assigning the 
*`USERNAME_FIELD`*
* You did not set your identifier (which I assume would be your username) 
to be *`unique=True`*

*https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD
 
<https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD>*


Good Luck,

Jeremy Gibson
email:      jgib...@caktusgroup.com
website:  http://www.caktusgroup.com/


On Tuesday, March 26, 2019 at 7:25:58 AM UTC-4, Shubham Joshi wrote:
>
> I want to create 2 separate signup form 1 for teacher and 1 for a student 
> for that I created 2 apps and its respective models but it gives an error 
>
>
> https://github.com/shubham1507/school
>
> ==================
> ERRORS:
> auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes 
> with reverse accessor for 'studentRegistration.groups'.
>         HINT: Add or change a related_name argument to the definition for 
> 'User.groups' or 'studentRegistration.groups'.
> auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes 
> with reverse accessor for 'teacherRegistration.groups'.
>         HINT: Add or change a related_name argument to the definition for 
> 'User.groups' or 'teacherRegistration.groups'.
> auth.User.user_permissions: (fields.E304) Reverse accessor for 
> 'User.user_permissions' clashes with reverse accessor for 
> 'studentRegistration.user_permissions'.
>         HINT: Add or change a related_name argument to the definition for 
> 'User.user_permissions' or 'studentRegistration.user_permissions'.
> auth.User.user_permissions: (fields.E304) Reverse accessor for 
> 'User.user_permissions' clashes with reverse accessor for 
> 'teacherRegistration.user_permissions'.
>         HINT: Add or change a related_name argument to the definition for 
> 'User.user_permissions' or 'teacherRegistration.user_permissions'.
> student.studentRegistration.groups: (fields.E304) Reverse accessor for 
> 'studentRegistration.groups' clashes with reverse accessor for 
> 'User.groups'.
>         HINT: Add or change a related_name argument to the definition for 
> 'studentRegistration.groups' or 'User.groups'.
> student.studentRegistration.groups: (fields.E304) Reverse accessor for 
> 'studentRegistration.groups' clashes with reverse accessor for 
> 'teacherRegistration.groups'.
>         HINT: Add or change a related_name argument to the definition for 
> 'studentRegistration.groups' or 'teacherRegistration.groups'.
> student.studentRegistration.image: (fields.E210) Cannot use ImageField 
> because Pillow is not installed.
>         HINT: Get Pillow at https://pypi.org/project/Pillow/ or run 
> command "pip install Pillow".
> student.studentRegistration.parents_name: (fields.E120) CharFields must 
> define a 'max_length' attribute.
> student.studentRegistration.user_permissions: (fields.E304) Reverse 
> accessor for 'studentRegistration.user_permissions' clashes with reverse 
> accessor for 'User.user_permissions'.
>         HINT: Add or change a related_name argument to the definition for 
> 'studentRegistration.user_permissions' or 'User.user_permissions'.
> student.studentRegistration.user_permissions: (fields.E304) Reverse 
> accessor for 'studentRegistration.user_permissions' clashes with reverse 
> accessor for 'teacherRegistration.user_permissions'.
>         HINT: Add or change a related_name argument to the definition for 
> 'studentRegistration.user_permissions' or 
> 'teacherRegistration.user_permissions'.
> teacher.teacherRegistration.groups: (fields.E304) Reverse accessor for 
> 'teacherRegistration.groups' clashes with reverse accessor for 
> 'User.groups'.
>         HINT: Add or change a related_name argument to the definition for 
> 'teacherRegistration.groups' or 'User.groups'.
> teacher.teacherRegistration.groups: (fields.E304) Reverse accessor for 
> 'teacherRegistration.groups' clashes with reverse accessor for 
> 'studentRegistration.groups'.
>         HINT: Add or change a related_name argument to the definition for 
> 'teacherRegistration.groups' or 'studentRegistration.groups'.
> teacher.teacherRegistration.qualification: (fields.E120) CharFields must 
> define a 'max_length' attribute.
> teacher.teacherRegistration.subjectExperty: (fields.E120) CharFields must 
> define a 'max_length' attribute.
> teacher.teacherRegistration.user_permissions: (fields.E304) Reverse 
> accessor for 'teacherRegistration.user_permissions' clashes with reverse 
> accessor for 'User.user_permissions'.
>         HINT: Add or change a related_name argument to the definition for 
> 'teacherRegistration.user_permissions' or 'User.user_permissions'.
> teacher.teacherRegistration.user_permissions: (fields.E304) Reverse 
> accessor for 'teacherRegistration.user_permissions' clashes with reverse 
> accessor for 'studentRegistration.user_permissions'.
>         HINT: Add or change a related_name argument to the definition for 
> 'teacherRegistration.user_permissions' or 
> 'studentRegistration.user_permissions'.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/318e95ef-aa18-406f-a85d-33c362dda2c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to