# Path: modeltranslation/translator.py
# class AlreadyRegistered(Exception):
# class NotRegistered(Exception):
# class DescendantRegistered(Exception):
# class FieldsAggregationMetaClass(type):
# class TranslationOptions(with_metaclass(FieldsAggregationMetaClass, object)):
# class MultilingualOptions(options.Options):
#         class NewMultilingualManager(
#             MultilingualManager, manager.__class__, MultilingualQuerysetManager
#         ):
#     class NewSingleObjectDescriptor(LanguageCacheSingleObjectDescriptor, ro_descriptor.__class__):
# class Translator(object):
#     def __new__(cls, name, bases, attrs):
#     def __init__(self, model):
#     def validate(self):
#     def _check_languages(self, languages, extra=()):
#     def update(self, other):
#     def add_translation_field(self, field, translation_field):
#     def get_field_names(self):
#     def __str__(self):
#     def base_manager(self):
# def add_translation_fields(model, opts):
# def has_custom_queryset(manager):
# def patch_manager_class(manager):
#             def deconstruct(self):
#             def __hash__(self):
#             def __eq__(self, other):
# def add_manager(model):
# def patch_constructor(model):
#     def new_init(self, *args, **kwargs):
# def delete_mt_init(sender, instance, **kwargs):
# def patch_clean_fields(model):
#     def new_clean_fields(self, exclude=None):
# def patch_get_deferred_fields(model):
#     def new_get_deferred_fields(self):
# def patch_refresh_from_db(model):
#     def new_refresh_from_db(self, using=None, fields=None):
# def delete_cache_fields(model):
# def populate_translation_fields(sender, kwargs):
# def patch_related_object_descriptor_caching(ro_descriptor):
#     def __init__(self):
#     def register(self, model_or_iterable, opts_class=None, **options):
#     def _register_single_model(self, model, opts):
#     def unregister(self, model_or_iterable):
#     def get_registered_models(self, abstract=True):
#     def _get_options_for_model(self, model, opts_class=None, **options):
#     def get_options_for_model(self, model):
# 
# Path: modeltranslation/tests/models.py
# class TestModel(models.Model):
# class UniqueNullableModel(models.Model):
# class ProxyTestModel(TestModel):
#     class Meta:
# class FallbackModel(models.Model):
# class FallbackModel2(models.Model):
# class FileFieldsModel(models.Model):
# class NonTranslated(models.Model):
# class ForeignKeyModel(models.Model):
# class OneToOneFieldModel(models.Model):
# class OtherFieldsModel(models.Model):
# class FancyDescriptor(object):
# class FancyField(models.PositiveIntegerField):
# class DescriptorModel(models.Model):
# class MultitableModelA(models.Model):
# class MultitableModelB(MultitableModelA):
# class MultitableModelC(MultitableModelB):
# class MultitableModelD(MultitableModelB):
# class AbstractModelA(models.Model):
#     class Meta:
# class AbstractModelB(AbstractModelA):
# class Slugged(models.Model):
#     class Meta:
# class MetaData(models.Model):
#     class Meta:
# class Displayable(Slugged, MetaData):
#     class Meta:
# class BasePage(Displayable):
#     class Meta:
# class Page(BasePage):
# class RichText(models.Model):
#     class Meta:
# class RichTextPage(Page, RichText):
# class DataModel(models.Model):
# class GroupFieldsetsModel(models.Model):
# class NameModel(models.Model):
# class ThirdPartyModel(models.Model):
# class ThirdPartyRegisteredModel(models.Model):
# class FilteredManager(MultilingualManager):
# class FilteredTestModel(models.Model):
# class ForeignKeyFilteredModel(models.Model):
# class ManagerTestModel(models.Model):
#     class Meta:
# class CustomManager(models.Manager):
# class CustomManagerTestModel(models.Model):
# class CustomQuerySet(models.query.QuerySet):
# class CustomManager2(models.Manager):
# class CustomManager2TestModel(models.Model):
# class CustomManagerAbstract(models.Manager):
# class CustomManagerBaseModel(models.Model):
#     class Meta:
# class CustomManagerChildTestModel(CustomManagerBaseModel):
# class PlainChildTestModel(CustomManagerBaseModel):
# class RequiredModel(models.Model):
# class ConflictModel(models.Model):
# class AbstractConflictModelA(models.Model):
#     class Meta:
# class AbstractConflictModelB(AbstractConflictModelA):
# class MultitableConflictModelA(models.Model):
# class MultitableConflictModelB(MultitableConflictModelA):
# class CustomQuerySetX(models.query.QuerySet):
# class CustomManagerX(models.Manager):
# class AbstractBaseModelX(models.Model):
#     class Meta:
# class AbstractModelX(AbstractBaseModelX):
#     class Meta:
# class ModelX(AbstractModelX):
# class AbstractModelXY(models.Model):
#     class Meta:
# class ModelXY(AbstractModelXY):
# class CustomManagerY(models.Manager):
# class AbstractModelY(models.Model):
#     class Meta:
# class ModelY(AbstractModelY):
#     class InheritedPermission(Permission):
#     def get_title(self):
#     def __init__(self, field):
#     def __get__(self, instance, owner):
#     def __set__(self, obj, value):
#     def __init__(self, *args, **kwargs):
#     def contribute_to_class(self, cls, name):
#     def pre_save(self, model_instance, add):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def get_queryset(self):
#     def get_queryset(self):
#     def custom_qs(self):
#     def foo(self):
#     def get_queryset(self):
#     def get_queryset(self):


from django.conf import settings
from django.utils.translation import gettext_lazy
from modeltranslation.translator import translator, register, TranslationOptions
from modeltranslation.tests import models
    from django.contrib.auth.models import Group
    from .models import InheritedPermission
@register(models.AbstractModelA)
class AbstractModelATranslationOptions(TranslationOptions):
    fields = ('titlea',)


@register(models.AbstractModelB)
class AbstractModelBTranslationOptions(TranslationOptions):
    fields = ('titleb',)


# ######### Fields inheritance testing


class SluggedTranslationOptions(TranslationOptions):
    fields = ('slug',)


class MetaDataTranslationOptions(TranslationOptions):
    fields = ('keywords',)


class RichTextTranslationOptions(TranslationOptions):
    fields = ('content',)


class PageTranslationOptions(TranslationOptions):
    fields = ('title',)


# BasePage left unregistered intentionally.

# Path: modeltranslation/translator.py
# class AlreadyRegistered(Exception):
# class NotRegistered(Exception):
# class DescendantRegistered(Exception):
# class FieldsAggregationMetaClass(type):
# class TranslationOptions(with_metaclass(FieldsAggregationMetaClass, object)):
# class MultilingualOptions(options.Options):
#         class NewMultilingualManager(
#             MultilingualManager, manager.__class__, MultilingualQuerysetManager
#         ):
#     class NewSingleObjectDescriptor(LanguageCacheSingleObjectDescriptor, ro_descriptor.__class__):
# class Translator(object):
#     def __new__(cls, name, bases, attrs):
#     def __init__(self, model):
#     def validate(self):
#     def _check_languages(self, languages, extra=()):
#     def update(self, other):
#     def add_translation_field(self, field, translation_field):
#     def get_field_names(self):
#     def __str__(self):
#     def base_manager(self):
# def add_translation_fields(model, opts):
# def has_custom_queryset(manager):
# def patch_manager_class(manager):
#             def deconstruct(self):
#             def __hash__(self):
#             def __eq__(self, other):
# def add_manager(model):
# def patch_constructor(model):
#     def new_init(self, *args, **kwargs):
# def delete_mt_init(sender, instance, **kwargs):
# def patch_clean_fields(model):
#     def new_clean_fields(self, exclude=None):
# def patch_get_deferred_fields(model):
#     def new_get_deferred_fields(self):
# def patch_refresh_from_db(model):
#     def new_refresh_from_db(self, using=None, fields=None):
# def delete_cache_fields(model):
# def populate_translation_fields(sender, kwargs):
# def patch_related_object_descriptor_caching(ro_descriptor):
#     def __init__(self):
#     def register(self, model_or_iterable, opts_class=None, **options):
#     def _register_single_model(self, model, opts):
#     def unregister(self, model_or_iterable):
#     def get_registered_models(self, abstract=True):
#     def _get_options_for_model(self, model, opts_class=None, **options):
#     def get_options_for_model(self, model):
# 
# Path: modeltranslation/tests/models.py
# class TestModel(models.Model):
# class UniqueNullableModel(models.Model):
# class ProxyTestModel(TestModel):
#     class Meta:
# class FallbackModel(models.Model):
# class FallbackModel2(models.Model):
# class FileFieldsModel(models.Model):
# class NonTranslated(models.Model):
# class ForeignKeyModel(models.Model):
# class OneToOneFieldModel(models.Model):
# class OtherFieldsModel(models.Model):
# class FancyDescriptor(object):
# class FancyField(models.PositiveIntegerField):
# class DescriptorModel(models.Model):
# class MultitableModelA(models.Model):
# class MultitableModelB(MultitableModelA):
# class MultitableModelC(MultitableModelB):
# class MultitableModelD(MultitableModelB):
# class AbstractModelA(models.Model):
#     class Meta:
# class AbstractModelB(AbstractModelA):
# class Slugged(models.Model):
#     class Meta:
# class MetaData(models.Model):
#     class Meta:
# class Displayable(Slugged, MetaData):
#     class Meta:
# class BasePage(Displayable):
#     class Meta:
# class Page(BasePage):
# class RichText(models.Model):
#     class Meta:
# class RichTextPage(Page, RichText):
# class DataModel(models.Model):
# class GroupFieldsetsModel(models.Model):
# class NameModel(models.Model):
# class ThirdPartyModel(models.Model):
# class ThirdPartyRegisteredModel(models.Model):
# class FilteredManager(MultilingualManager):
# class FilteredTestModel(models.Model):
# class ForeignKeyFilteredModel(models.Model):
# class ManagerTestModel(models.Model):
#     class Meta:
# class CustomManager(models.Manager):
# class CustomManagerTestModel(models.Model):
# class CustomQuerySet(models.query.QuerySet):
# class CustomManager2(models.Manager):
# class CustomManager2TestModel(models.Model):
# class CustomManagerAbstract(models.Manager):
# class CustomManagerBaseModel(models.Model):
#     class Meta:
# class CustomManagerChildTestModel(CustomManagerBaseModel):
# class PlainChildTestModel(CustomManagerBaseModel):
# class RequiredModel(models.Model):
# class ConflictModel(models.Model):
# class AbstractConflictModelA(models.Model):
#     class Meta:
# class AbstractConflictModelB(AbstractConflictModelA):
# class MultitableConflictModelA(models.Model):
# class MultitableConflictModelB(MultitableConflictModelA):
# class CustomQuerySetX(models.query.QuerySet):
# class CustomManagerX(models.Manager):
# class AbstractBaseModelX(models.Model):
#     class Meta:
# class AbstractModelX(AbstractBaseModelX):
#     class Meta:
# class ModelX(AbstractModelX):
# class AbstractModelXY(models.Model):
#     class Meta:
# class ModelXY(AbstractModelXY):
# class CustomManagerY(models.Manager):
# class AbstractModelY(models.Model):
#     class Meta:
# class ModelY(AbstractModelY):
#     class InheritedPermission(Permission):
#     def get_title(self):
#     def __init__(self, field):
#     def __get__(self, instance, owner):
#     def __set__(self, obj, value):
#     def __init__(self, *args, **kwargs):
#     def contribute_to_class(self, cls, name):
#     def pre_save(self, model_instance, add):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def get_queryset(self):
#     def get_queryset(self):
#     def custom_qs(self):
#     def foo(self):
#     def get_queryset(self):
#     def get_queryset(self):


# Path: modeltranslation/tests/translation.py
from django.conf import settings
from django.utils.translation import gettext_lazy
from modeltranslation.translator import translator, register, TranslationOptions
from modeltranslation.tests import models
    from django.contrib.auth.models import Group
    from .models import InheritedPermission

@register(models.AbstractModelA)
class AbstractModelATranslationOptions(TranslationOptions):
    fields = ('titlea',)


@register(models.AbstractModelB)
class AbstractModelBTranslationOptions(TranslationOptions):
    fields = ('titleb',)


# ######### Fields inheritance testing


class SluggedTranslationOptions(TranslationOptions):
    fields = ('slug',)


class MetaDataTranslationOptions(TranslationOptions):
    fields = ('keywords',)


class RichTextTranslationOptions(TranslationOptions):
    fields = ('content',)


class PageTranslationOptions(TranslationOptions):
    fields = ('title',)


# BasePage left unregistered intentionally.

translator.register(models.Slugged, SluggedTranslationOptions)