Hy,
in first sorry for my bad english,
i use the new 0.9 version of django-modeltranslation with the latest checkout from django v1.8. Since i had upgraded have problems with my categories app based on django-mptt.
I have an base category class for mptt-handling and 2 proxy models based on it for trees and the categories
for example:
models.py
class BaseCategory(MPTTModel):
name = models.CharField(_('name'), max_length=255)
...
class CategoryTree(BaseCategory):
class Meta:
proxy = True
class Category(BaseCategory):
class Meta:
proxy = True
translation.py
class BaseTransOpts(TranslationOptions):
fields = ('name',)
translator.register(BaseCategory, BaseTransOpts)
translator.register(CategoryTree, BaseTransOpts)
translator.register(Category, BaseTransOpts)
The Problem is in DjangoAdminClasses for the proxy models the fields which should translated are not available. When i set it explizit in fields property of TranslationAdmin i get an FieldError:
Unknown field(s) (name_de) specified for CategoryTree. Check fields/fieldsets/exclude attributes of class CategoryTreeAdmin
Also when i set name in list_display property i get a NoneType Error
I have check the problem over the python-shell. When i ask the Meta-Api with get_fields() the TranslationFields are listed but when i try to get the field with get_field('name_de') - i get an FieldDoesNotExist Exception.
Also when try with print the value - i get an 'object has no attribute 'name_de' Exception.
I have create an TranslationAdminClass for the BaseCategory-Model for testing, there are no problems.
What can i do?