aldryn_bootstrap3出错:字段定义了与模型' ...'的关系,该关系未安装或是抽象的

时间:2015-08-28 11:10:22

标签: python django twitter-bootstrap

当我在virtualenv中运行migrate.py时,我收到以下错误:

$ python manage.py migrate aldryn_bootstrap3
CommandError: System check identified some issues:

ERRORS:
aldryn_bootstrap3.Boostrap3ButtonPlugin.link_file: (fields.E300) Field defines a relation with model 'File', which is either not installed, or is abstract.
aldryn_bootstrap3.Boostrap3ImagePlugin.file: (fields.E300) Field defines a relation with model 'Image', which is either not installed, or is abstract.
aldryn_bootstrap3.Bootstrap3CarouselSlideFolderPlugin.folder: (fields.E300) Field defines a relation with model 'Folder', which is either not installed, or is abstract.
aldryn_bootstrap3.Bootstrap3CarouselSlidePlugin.image: (fields.E300) Field defines a relation with model 'Image', which is either not installed, or is abstract.
aldryn_bootstrap3.Bootstrap3CarouselSlidePlugin.link_file: (fields.E300) Field defines a relation with model 'File', which is either not installed, or is abstract.
aldryn_bootstrap3.Bootstrap3FilePlugin.file: (fields.E300) Field defines a relation with model 'File', which is either not installed, or is abstract.

我已将aldryn_bootstrap3添加到INSTALLED_APPS的{​​{1}}。

1 个答案:

答案 0 :(得分:4)

Aldryn Bootstrap3取决于django-filer。你应该install it first

INSTALLED_APPS = [
    ...
    'filer',
    'mptt',
    'easy_thumbnails',
    ...
]

你得到的错误(字段定义与模型的关系'文件',未安装或抽象)告诉你某些模型依赖于其他模型Django找不到的模型。

具体来说,在这种情况下,Aldryn Bootstrap3模型取决于django-filer中定义的模型FileImageFolder