mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
Resolve issue with avatars on docs/guide page (#1349)
Related to #1307, couldn't reproduce that specific issue, but did see an issue with the avatar sizing and styling, so added tailwind to docs template
This commit is contained in:
@@ -14,7 +14,7 @@ from allauth.socialaccount.views import SignupView as SocialSignupView
|
||||
|
||||
from rest_framework import generics
|
||||
from rest_framework import viewsets
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.permissions import IsAuthenticated, AllowAny
|
||||
|
||||
from .forms import PreferencesForm, UserProfileForm, UserProfilePhotoForm
|
||||
from .models import User
|
||||
@@ -279,3 +279,18 @@ class CustomEmailVerificationSentView(EmailVerificationSentView):
|
||||
"EMAIL_CONFIRMATION_EXPIRE_DAYS"
|
||||
] = app_settings.EMAIL_CONFIRMATION_EXPIRE_DAYS
|
||||
return context
|
||||
|
||||
|
||||
class UserAvatar(TemplateView):
|
||||
"""
|
||||
Returns the template for the user's avatar in the header from the htmx request.
|
||||
"""
|
||||
|
||||
permission_classes = [AllowAny]
|
||||
template_name = "users/includes/header_avatar.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["user"] = self.request.user
|
||||
context["mobile"] = self.request.GET.get("ui")
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user