Enums
- class django_tinyuser.enums.FriendshipBlockedStatus(*values)[source]
Bases:
StrEnumEnumeration for representing the blocked status of a friendship.
- BLOCKED_BY_FROM_USER = 'blocked_by_from_user'
- BLOCKED_BY_TO_USER = 'blocked_by_to_user'
- NOT_BLOCKED = 'not_blocked'
- static from_string(status_str)[source]
Convert a string to a FriendshipBlockedStatus enum member.
- Parameters:
status_str (str) – The string representation of the blocked status.
- Returns:
The corresponding FriendshipBlockedStatus enum member.
- Return type:
- Raises:
ValueError – If the input string does not correspond to any valid blocked status.
- property name: str
Return the translated name of the enum member.
- Returns:
The translated name of the enum member.
- Return type:
str
- property name_lazy: str
Return the lazy translation of the enum member’s name.
- Returns:
The lazy translation of the enum member’s name.
- Return type:
str
- property name_raw: str
Return the raw name of the enum member.
- Returns:
The raw name of the enum member.
- Return type:
str
- class django_tinyuser.enums.FriendshipStatus(*values)[source]
Bases:
StrEnumEnumeration for representing the status of a friendship.
- ACCEPTED = 'accepted'
- PENDING = 'pending'
- REJECTED = 'rejected'
- static from_string(status_str)[source]
Convert a string to a FriendshipStatus enum member.
- Parameters:
status_str (str) – The string representation of the friendship status.
- Returns:
The corresponding FriendshipStatus enum member.
- Return type:
- Raises:
ValueError – If the input string does not correspond to any valid status.
- property name: str
Return the translated name of the enum member.
- Returns:
The translated name of the enum member.
- Return type:
str
- property name_lazy: str
Return the lazy translation of the enum member’s name.
- Returns:
The lazy translation of the enum member’s name.
- Return type:
str
- property name_raw: str
Return the raw name of the enum member.
- Returns:
The raw name of the enum member.
- Return type:
str