gpt4 book ai didi

django-taggit-autocomplete 和南

转载 作者:行者123 更新时间:2023-12-02 06:52:06 26 4
gpt4 key购买 nike

我使用 django-taggit-autocomplete,但是在进行方案迁移时,出现错误

 ! Cannot freeze field 'main.hotels.tags'
! (this field has class taggit_autocomplete_modified.managers.TaggableManagerAutocomplete)
! Cannot freeze field 'main.rooms.tags'
! (this field has class taggit_autocomplete_modified.managers.TaggableManagerAutocomplete)

! 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

所以我搜索了一下,发现了 django-taggit-autocomplete-modified,这应该可以解决问题,但事实并非如此。

解决这个问题的最佳方法是什么?

最佳答案

最后我解决了将以下代码添加到 models.py 的问题

from south.modelsinspector import add_ignored_fields
add_ignored_fields(["^taggit_autocomplete\.managers"])

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

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