我想在django-admin中链接外键,因此我正在使用django-smart-selects。我正确地遵循了文档]
url(r'^chaining/', include('smart_selects.urls')),
class AddressModel(BaseModel):
country = models.ForeignKey(CountryModel, null=True, blank=True, on_delete=models.PROTECT)
state = ChainedForeignKey(StateModel, chained_field=country, chained_model_field=country,
null=True, blank=True, on_delete=models.PROTECT)
city = models.CharField(max_length=200, null=True, blank=True)
并将其添加到我的setting.py
JQUERY_URL = True
但是每次我尝试从管理员创建地址时,都会出现此错误:-
如果path.startswith(('http://','https://','/')):AttributeError:“ bool”对象没有属性“ startswith”
如何解决?
JQUERY_URL = True。>