# This is not a I18nModel subclass, so ignore it
return ModelBase.__new__(mcs, name, bases, attrs)
- attr_meta = attrs.
+ attr_meta = attrs.('Meta', None)
# First determine what the source model is (and throw if unknown)
# attribute in model's Meta options:
source = getattr(attr_meta, 'source_model', None)
+ # Remove the source_model attribute if any, pass on exception
+ del attrs['Meta'].source_model
if source and type(source) in [str, unicode]:
# The source is a string, so we need to find out what the developer
# meant by that. Possibly a class or a model.
# First look at the ``translation_fields`` Meta options
fields = getattr(attr_meta, 'translation_fields', )
+ # Remove translation_fields attribute if any, pass on exception
+ del attrs['Meta'].translation_fields
# No fields were found, so let's grab all CharField, SlugField,
# and TextField from the source model.