1. Branko Vukelic
  2. django-i18n-model
  3. Pull requests

Pull requests

#3 Open
Repository
Deleted repository
Branch
optional-meta (98e80fe9917e)
Repository
django-i18n-model
Branch
master

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

Author
  1. Tomas Neme
Reviewers
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.

Comments (0)