'SystemCheckError: System check identified some issuess:
When I added this profile model then only I am getting this error. I really don't know what to do here. please help me out this.
app_name = 'Master'
models.py:
class Profile(User):
user = models.OneToOneField(User, on_delete=models.CASCADE)
address = models.TextField(max_length=200,null=False)
contact_number = models.PositiveIntegerField(null=False)
ut=(('Admin','Admin'),('Operator','Operator'),('Ticket generator User','Ticket generator User'),('Inspector','Inspector'),('User 80','User 80'),('Final Inspection','Final Inspection'),('Maintenance','Maintenance'),('Ticket Admin','Ticket Admin'),)
user_type = models.CharField(max_length=200, null=False, choices=ut)
Erros:
raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
ERRORS:
Master.Profile.user: (fields.E304) Reverse accessor for 'Master.Profile.user' clashes with reverse accessor for 'Master.Profile.user_ptr'.
HINT: Add or change a related_name argument to the definition for 'Master.Profile.user' or 'Master.Profile.user_ptr'.
Master.Profile.user: (fields.E305) Reverse query name for 'Master.Profile.user' clashes with reverse query name for 'Master.Profile.user_ptr'.
HINT: Add or change a related_name argument to the definition for 'Master.Profile.user' or 'Master.Profile.user_ptr'.
Master.Profile.user_ptr: (fields.E304) Reverse accessor for 'Master.Profile.user_ptr' clashes with reverse accessor for 'Master.Profile.user'.
HINT: Add or change a related_name argument to the definition for 'Master.Profile.user_ptr' or 'Master.Profile.user'.
Master.Profile.user_ptr: (fields.E305) Reverse query name for 'Master.Profile.user_ptr' clashes with reverse query name for 'Master.Profile.user'.
HINT: Add or change a related_name argument to the definition for 'Master.Profile.user_ptr' or 'Master.Profile.user'.
System check identified 4 issues (0 silenced).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
