我的开发环境运行的是python2.7.1,生产环境运行的是2.7.6
下面的代码在开发过程中运行良好,但在生产时不会触发new_city油田的自动完成功能:
管理员py
class LocationAdminForm(autocomplete_light.ModelForm):
class Media:
js = ('dependant_autocomplete.js',)
class Meta:
model = Location
fields = ['name', 'instagram_id', 'country', 'new_country', 'city', 'new_city']
class LocationAdmin(admin.ModelAdmin):
list_display = ['name', 'country', 'city', 'new_country', 'new_city']
search_fields = ['name', 'new_country', 'new_city']
list_editable = []
list_filter = ['new_city', 'new_country']
form = LocationAdminForm
自动完成-注册表.py
^{pr2}$你知道这是什么原因吗?或者我该如何排除故障吗?在
在查看了“自动完成”轻型文档后,我在LocationAdminForm中缺少以下内容:
相关问题 更多 >
编程相关推荐