Skip to main content

GroupManager

The manager for the auth's Group model.

Attributes

AttributeTypeDescription
use_in_migrationsboolean = TrueA boolean flag indicating that this manager should be serialized into migrations and available on the model during migration operations.

Methods


get_by_natural_key()

@classmethod
def get_by_natural_key(
name: string
) - > [Group](../../../utils/regex/helper/group.md?sid=django_utils_regex_helper_group)

Fetches a Group instance using its unique name, which serves as its natural key for serialization and lookups.

Parameters

NameTypeDescription
namestringThe unique name of the group to retrieve.

Returns

TypeDescription
[Group](../../../utils/regex/helper/group.md?sid=django_utils_regex_helper_group)The Group instance matching the provided name.

aget_by_natural_key()

@classmethod
def aget_by_natural_key(
name: string
) - > Coroutine[[Group](../../../utils/regex/helper/group.md?sid=django_utils_regex_helper_group)]

Asynchronously fetches a Group instance using its unique name, which serves as its natural key for serialization and lookups.

Parameters

NameTypeDescription
namestringThe unique name of the group to retrieve.

Returns

TypeDescription
Coroutine[[Group](../../../utils/regex/helper/group.md?sid=django_utils_regex_helper_group)]A coroutine that resolves to the Group instance matching the provided name.