Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initials Avatar #246

Open
FincaUrbanaApp opened this issue Apr 29, 2024 · 3 comments
Open

Initials Avatar #246

FincaUrbanaApp opened this issue Apr 29, 2024 · 3 comments

Comments

@FincaUrbanaApp
Copy link

Good afternoon.

How can I make django-avatar generate a circular avatar with the user's initials using the InitialsAvatarProvider(object) provider?

I have studied the code but I cannot implement the get_avatar_url method of that provider InitialsAvatarProvider.

Thank you so much.

@StanislavJPG
Copy link

@FincaUrbanaApp, Hi! have you figured it out?

@christianwgd
Copy link

The documented method for changing the avatar provider is to put the provider class into the settings:

AVATAR_PROVIDERS = ( "avatar.providers.InitialsAvatarProvider", "avatar.providers.DefaultAvatarProvider", )

You can even create your own provider class and configure it in the same way, maybe because you would like to have the InitialsProvider as some backup provider.

@StanislavJPG
Copy link

@christianwgd, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants