自定义用户中另一个应用程序的外键

时间:2015-09-29 07:04:36

标签: python django django-models

使用CustomUser时出现问题。

apps.accounts.MyUser将关系(ForeignKey)定义为
apps.registro.models.InstitucionEducativa。但是,当执行runserver时,它会显示以下错误:

apps.accounts.MyUser.school: (fields.E300) Field defines a relation with model 'apps.registro.models.InstitucionEducativa', which is either not installed, or is abstract.

我的设置.INSTALLED_APPS等于:

DJANGO_APPS = (
    PACKAGE_NAME_GRAPPELLI,
    PACKAGE_NAME_FILEBROWSER,
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'django_comments',
)

LOCAL_APPS = (
    'apps.registro',
    'apps.accounts',
    'apps.pages',
    'apps.core',
    'apps.conf',
    'apps.utils',
    'apps.generic',
    'apps.service',
    'apps.resource',
    'apps.friends',
    'apps.forums',
    'apps.links',
    # 'oauth2_provider',
    # 'rest_framework',
 )

THIRD_APPS = (
    'django_extensions',
    'import_export',
    'social.apps.django_app.default'
),

有人可以帮我一把吗? 。谢谢!

0 个答案:

没有答案