当我在我的 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
添加到 settings.py
。 最佳答案
Aldryn Bootstrap3 依赖于 django-filer 。你应该 install it first :
INSTALLED_APPS = [
...
'filer',
'mptt',
'easy_thumbnails',
...
]
您收到的错误(字段定义了与模型"file"的关系,该模型要么未安装,要么是抽象的)告诉您某些模型依赖于 Django 无法找到的其他模型。
具体来说,在这种情况下,Aldryn Bootstrap3 模型依赖于 django-filer 中定义的模型
File
、 Image
和 Folder
。关于python - 未安装或抽象的 aldryn_bootstrap3 : Field defines a relation with model '...' , 出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32269695/