# Path: localized_fields/models.py
# class LocalizedModel(AtomicSlugRetryMixin, PostgresModel):
#     """Turns a model into a model that contains LocalizedField's.
# 
#     For basic localisation functionality, it isn't needed to inherit
#     from LocalizedModel. However, for certain features, this is required.
# 
#     It is definitely needed for :see:LocalizedUniqueSlugField, unless you
#     manually inherit from AtomicSlugRetryMixin.
#     """
# 
#     class Meta:
#         abstract = True


import uuid
from django.contrib.postgres.operations import HStoreExtension
from django.db import connection, migrations
from django.db.migrations.executor import MigrationExecutor
from localized_fields.models import LocalizedModel




def define_fake_model(fields=None, model_base=LocalizedModel, meta_options={}):
    name = str(uuid.uuid4()).replace("-", "")[:8]

    attributes = {
        "app_label": "tests",
        "__module__": __name__,
        "__name__": name,
        "Meta": type("Meta", (object,), meta_options),
    }

    if fields:
        attributes.update(fields)
    model = type(name, (model_base,), attributes)

    return model



# Path: localized_fields/models.py
# class LocalizedModel(AtomicSlugRetryMixin, PostgresModel):
#     """Turns a model into a model that contains LocalizedField's.
# 
#     For basic localisation functionality, it isn't needed to inherit
#     from LocalizedModel. However, for certain features, this is required.
# 
#     It is definitely needed for :see:LocalizedUniqueSlugField, unless you
#     manually inherit from AtomicSlugRetryMixin.
#     """
# 
#     class Meta:
#         abstract = True


# Path: tests/fake_model.py
import uuid
from django.contrib.postgres.operations import HStoreExtension
from django.db import connection, migrations
from django.db.migrations.executor import MigrationExecutor
from localized_fields.models import LocalizedModel





def define_fake_model(fields=None, model_base=LocalizedModel, meta_options={}):
    name = str(uuid.uuid4()).replace("-", "")[:8]

    attributes = {
        "app_label": "tests",
        "__module__": __name__,
        "__name__": name,
        "Meta": type("Meta", (object,), meta_options),
    }

    if fields:
        attributes.update(fields)
    model = type(name, (model_base,), attributes)

    return model



def get_fake_model(fields=None, model_base=LocalizedModel, meta_options={}):