ローカリゼーションには django-shop と django-transmeta を使用しています。
トランスメタを使用するには、追加する必要があります
class Model():
__metaclass__ = TransMeta
name = CharField()
class Meta:
translate = ('name',)
django-shop-categories を使用するには、ProductCategoryBase から継承する必要があります。
class MyCategory(ProductCategoryBase):
class Meta:
abstract = False
これにより、名前、スラッグなどのフィールドを持つカテゴリ モデルが得られます。そして、カテゴリ (および製品) の国際化 (django-transmeta) を有効にしたいと考えています。
class MyCategory(ProductCategoryBase):
__metaclass__ = TransMeta
class Meta:
translate = ()
abstract = False
translate = ('name',) #name is a property of ProductCategoryBase inherited from MPPTModel
問題は、次のようなエラーが発生することです。
django.core.exceptions.ImproperlyConfigured: There is no field name in model MyCategory, as specified in Meta's translate attribute