2
:私のモデルを変更した後syncdbの実行を実行中に予期しないキーワード引数 'chained_model_field'ジャンゴsmart_selects - syncdbの実行エラーエラーを取得
を得たのinit():
はTypeError
。model.py
class Category(models.Model):
cat_no = models.IntegerField(null=True, blank=True)
cat_txt = models.CharField(max_length=45)
class E_cat(models.Model):
cat_no = models.ForeignKey(Category)
cat_txt = models.CharField(max_length=45)
scat_no = models.IntegerField(null=True, blank=True)
scat_txt = models.CharField(max_length=45)
class Equip(models.Model):
category = models.ForeignKey(Category)
subcategory = models.ForeignKey(
E_cat,
chained_field="cat_no",
chained_model_field="cat_no",
show_all=False,
auto_choose=True,
)
manufacturer = models.CharField(max_length=35, blank=True)
mfg_no = models.CharField(max_length=35, blank=True)
size = models.CharField(max_length=35, blank=True)
color = models.CharField(max_length=35, blank=True)
quanity = models.IntegerField(null=True, blank=True)
short_description = models.CharField(max_length=80, blank=True)
location_zip = models.IntegerField(null=True, blank=True)
listings = models.ForeignKey(Listings)
info = models.TextField(null=True, blank=True)
問題を解決しました---クラスEquip(models.Model): カテゴリ= models.ForeignKey(Category) ===> subcategory = ChainedForeignKey( – BillB1951