SystemCheckError: Проверка системы выявила некоторые проблемы:

Когда я добавил эту модель профиля, только тогда я получаю эту ошибку. Я действительно не знаю, что делать. Пожалуйста, помогите мне с этим.

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)

Эррос:

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).
Вернуться на верх