reviewboard.avatars.settings¶
- class UserProfileAvatarSettingsManager(user)¶
Bases:
AvatarSettingsManager
A mixin that provides avatar service configuration from profiles.
- AVATAR_SETTINGS_KEY = 'avatars'¶
- AVATAR_SETTINGS_SERVICE_ID_KEY = 'avatar_service_id'¶
- AVATAR_SETTINGS_CONFIGURATION_KEY = 'configuration'¶
- __init__(user)¶
Initialize the settings manager.
- Parameters:
user (
django.contrib.auth.models.User
) – The user.
- property avatar_service_id¶
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:
- property configuration¶
The user’s configuration for all avatar services.
- Returns:
The user’s configuration for the avatar service.
- Return type:
- configuration_for(avatar_service_id)¶
The user’s configuration for the given avatar service.
- save()¶
Save the user’s settings to their profile