if Meta doesn't exist, create an empty class for it

Open
#3 · Created  · Last updated

Description

All properties in the Meta class are optional, if you name your translation model MyModelI18N you don't need a source_model attribute, and if you want all fields to be translatable you don't need a translation_fields attribute.

But the current code in this file makes it necessary to have at least this:

class MyModelI18N(I18nModel): class Meta: pass

A better solution might be either using the attr_meta variable or adding KeyError to the exception catching all over this file.

0 attachments

0 comments

Loading commits...