M
M
Mike2017-03-20 15:49:21
Django
Mike, 2017-03-20 15:49:21

Why am I getting system errors?

I'm trying to expand the user, but apparently not fate. In short, please see what I'm doing wrong.
modals.py

from django.contrib.auth.models import AbstractUser, UserManager
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.conf import settings

class Profile(AbstractUser):
    user = models.ForeignKey(settings.AUTH_USER_MODEL)
    status = models.CharField(max_length=100, verbose_name=_('status_Q'), blank=True)
    object = UserManager()

    class Meta:
        db_table = 'profiles'
        verbose_name = _('user profile')
        verbose_name_plural = _('user profiles')

in settings.py i set a variable like this where fighter my app is "AUTH_USER_MODULE = 'fighter.Profile'"
the errors i get is this
HINT: Add or change a related_name argument to the definition for 'Profile.user_permissions' or 'User.user_permissions' .
I'm using django 1.10 and python 3.5 now

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question