1

I have a django model class and I applied model translation on that class as described below. I applied translation for some of the model fields. Now if i inherit this model to another model class, then I can not get access to the fields of the parent class which are added into translation. why?

class LayerTranslationOptions(TranslationOptions):
    fields = (
        'title',
        'abstract',
        'purpose',
        'constraints_other',
        'supplemental_information',
        'data_quality_statement',
    )

   translator.register(Layer, LayerTranslationOptions)
Sardorbek Imomaliev
  • 14,861
  • 2
  • 51
  • 63
cjahangir
  • 1,773
  • 18
  • 27
  • Do you had try with `abstract models` so when do you inherit model use `class Meta` with field `abstract=True` in your parent model, with that field set you will have all fields of your parent model. – julian salas Mar 29 '17 at 06:16
  • Cause you're not registering the other class with `translator.register`? – Andrey Shipilov Mar 29 '17 at 06:56

0 Answers0