gpt4 book ai didi

python - django-eav 和南方

转载 作者:太空狗 更新时间:2023-10-30 02:34:36 24 4
gpt4 key购买 nike

我正在开始一个新的 django 项目,并且像往常一样,我将安装的应用程序放在南方。

然后我需要某种 eav 来存储模型中的一些字段,我找到了一个完全符合我要求的应用程序,即 django-eav ( https://github.com/mvpdev/django-eav )

但现在我遇到了一个问题,因为 south 提示不知道如何使用 django-eav。

! Cannot freeze field 'eav.attribute.slug'
! (this field has class eav.fields.EavSlugField)
! Cannot freeze field 'eav.attribute.datatype'
! (this field has class eav.fields.EavDatatypeField)

! South cannot introspect some fields; this is probably because they are custom
! fields. If they worked in 0.6 or below, this is because we have removed the
! models parser (it often broke things).
! To fix this, read http://south.aeracode.org/wiki/MyFieldsDontWork

我正在读这个 http://south.aeracode.org/docs/customfields.html我正试图在不放弃这两个项目中的任何一个的情况下解决这个问题。

谁能帮帮我?谢谢

最佳答案

我找到的最佳答案来自 http://south.aeracode.org/docs/settings.html#setting-south-migration-modules

建议你在settings.py中设置添加一个SOUTH_MIGRATION_MODULES dict,并将那个app映射到一个不存在的模块

SOUTH_MIGRATION_MODULES = {
'eav': 'ignore',
}

关于python - django-eav 和南方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7434017/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com