GroupManager
The manager for the auth's Group model.
Attributes
| Attribute | Type | Description |
|---|---|---|
| use_in_migrations | boolean = True | A 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
| Name | Type | Description |
|---|---|---|
| name | string | The unique name of the group to retrieve. |
Returns
| Type | Description |
|---|---|
[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
| Name | Type | Description |
|---|---|---|
| name | string | The unique name of the group to retrieve. |
Returns
| Type | Description |
|---|---|
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. |