This documentation covers the in-development release of Review Board.
You can see the stable Review Board
documentation or
all previous versions.
reviewboard.avatars.settings
-
class UserProfileAvatarSettingsManager(user)[source]
Bases: AvatarSettingsManager
A mixin that provides avatar service configuration from profiles.
-
AVATAR_SETTINGS_KEY = 'avatars'[source]
-
AVATAR_SETTINGS_SERVICE_ID_KEY = 'avatar_service_id'[source]
-
AVATAR_SETTINGS_CONFIGURATION_KEY = 'configuration'[source]
-
__init__(user)[source]
Initialize the settings manager.
- Parameters:
user (django.contrib.auth.models.User
) – The user.
-
property avatar_service_id[source]
Return service ID for the user’s selected avatar service.
- Returns:
The avatar service ID for the user’s selected avatar service, or
None
if they have not selected one.
- Return type:
unicode
-
property configuration[source]
The user’s configuration for all avatar services.
- Returns:
The user’s configuration for the avatar service.
- Return type:
dict
-
configuration_for(avatar_service_id)[source]
The user’s configuration for the given avatar service.
- Parameters:
avatar_service_id (unicode
) – The ID of the avatar service
to get the
configuration for.
- Returns:
The configuration dictionary for the requested avatar service. It
will be created if it does not already exist.
- Return type:
dict
-
save()[source]
Save the user’s settings to their profile