From 5b58d4da9d9bc80c0acee0dd5901011a7f632fc7 Mon Sep 17 00:00:00 2001 From: Nazarii Date: Thu, 11 Apr 2024 22:13:12 +0300 Subject: [PATCH] upd --- web/api/v1/auth_app/services.py | 14 +++++++------- .../templates/user_profile/profile.html | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/api/v1/auth_app/services.py b/web/api/v1/auth_app/services.py index 7a4aca34..7a2b8db4 100644 --- a/web/api/v1/auth_app/services.py +++ b/web/api/v1/auth_app/services.py @@ -96,7 +96,7 @@ class LoginService: def __init__(self, request): self.request = request - self.rest_settings: dict = settings.REST_AUTH + self.settings: dict = settings.REST_AUTH def _authenticate(self, **kwargs: str): return authenticate(self.request, **kwargs) @@ -152,20 +152,20 @@ def __set_jwt_cookie(self, response, key: str, token_value: str, token_expiratio key=key, value=token_value, expires=token_expiration, - secure=self.rest_settings['JWT_AUTH_SECURE'], - httponly=self.rest_settings['JWT_AUTH_HTTPONLY'], - samesite=self.rest_settings['JWT_AUTH_SAMESITE'], - domain=self.rest_settings['JWT_COOKIE_DOMAIN'], + secure=self.settings['JWT_AUTH_SECURE'], + httponly=self.settings['JWT_AUTH_HTTPONLY'], + samesite=self.settings['JWT_AUTH_SAMESITE'], + domain=self.settings['JWT_COOKIE_DOMAIN'], ) def _set_jwt_access_cookie(self, response: "HttpResponse", access_token: str): access_token_expiration = timezone.now() + jwt_settings.ACCESS_TOKEN_LIFETIME - self.__set_jwt_cookie(response, self.rest_settings['JWT_AUTH_COOKIE'], access_token, access_token_expiration) + self.__set_jwt_cookie(response, self.settings['JWT_AUTH_COOKIE'], access_token, access_token_expiration) def _set_jwt_refresh_cookie(self, response: "HttpResponse", refresh_token: str): refresh_token_expiration = timezone.now() + jwt_settings.REFRESH_TOKEN_LIFETIME self.__set_jwt_cookie( - response, self.rest_settings['JWT_AUTH_REFRESH_COOKIE'], refresh_token, refresh_token_expiration + response, self.settings['JWT_AUTH_REFRESH_COOKIE'], refresh_token, refresh_token_expiration ) diff --git a/web/user_profile/templates/user_profile/profile.html b/web/user_profile/templates/user_profile/profile.html index f35efb36..9b57317e 100644 --- a/web/user_profile/templates/user_profile/profile.html +++ b/web/user_profile/templates/user_profile/profile.html @@ -14,7 +14,7 @@
{% include 'user_profile/include/block_avatar.html' %} -
+

{% include 'user_profile/include/block_followers.html' %} {% include 'user_profile/include/block_website.html' %} {% include 'user_profile/include/block_activity.html' %}