Jump to >

This documentation covers the in-development release of Djblets. You can see the latest stable docs or all previous versions.

djblets.avatars.settings

Settings managers for avatar service registries.

class AvatarSettingsManager(user)[source]

The settings manager is responsible for loading and saving settings.

Each user can have different avatar configuration and the settings manager is responsible for loading and saving per-user configuration for services.

This class is intended to be sub-classed to be able to provide configuration management for individual users.

property avatar_service_id[source]

The 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 the service.

This must be implemented in a subclasses.

Returns

The user’s configuration.

Return type

dict

configuration_for(avatar_service_id)[source]

Get the configuration for the requested avatar service.

Parameters

avatar_service_id (unicode) – The ID of the avatar service to retrieve configuration for.

save()[source]

Save the configuration.

This must be implemented in a subclass.