(model_admin)
return ImmutableAdmin(
        *[getattr(model_admin, x) for x in model_admin.model_admin_attributes]
    )
Provide an ImmutableAdmin to make it harder for developers to
    dig themselves into holes.
    See https://github.com/twoscoops/django-admin2/issues/99
    Frozen class implementation as namedtuple suggested by Audrey Roy

    Note: This won't stop developers from saving mutable objects to
    the result, but hopefully developers attempting that
    'workaround/hack' will read our documentation.
Provide an ImmutableAdmin to make it harder for developers to
    dig themselves into holes.
    See https://github.com/twoscoops/django-admin2/issues/99
    Frozen class implementation as namedtuple suggested by Audrey Roy
Provide an ImmutableAdmin to make it harder for developers to dig themselves into holes . See https : // github . com / twoscoops / django - admin2 / issues / 99 Frozen class implementation as namedtuple suggested by Audrey Roy
def immutable_admin_factory(model_admin):
    """
    Provide an ImmutableAdmin to make it harder for developers to
    dig themselves into holes.
    See https://github.com/twoscoops/django-admin2/issues/99
    Frozen class implementation as namedtuple suggested by Audrey Roy

    Note: This won't stop developers from saving mutable objects to
    the result, but hopefully developers attempting that
    'workaround/hack' will read our documentation.
    """
    ImmutableAdmin = namedtuple("ImmutableAdmin", model_admin.model_admin_attributes)
    return ImmutableAdmin(
        *[getattr(model_admin, x) for x in model_admin.model_admin_attributes]
    )
def immutable_admin_factory ( model_admin ) : ImmutableAdmin = namedtuple ( "ImmutableAdmin" , model_admin . model_admin_attributes ) return ImmutableAdmin ( * [ getattr ( model_admin , x ) for x in model_admin . model_admin_attributes ] )