From 43aeb2290d586ada47c4189346e2af581005c988 Mon Sep 17 00:00:00 2001 From: Alexander-D-Karpov Date: Thu, 7 Dec 2023 12:49:58 +0300 Subject: [PATCH] updated allauth login --- akarpov/templates/socialaccount/signup.html | 26 +++++++++++++++++++++ config/settings/base.py | 6 ++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 akarpov/templates/socialaccount/signup.html diff --git a/akarpov/templates/socialaccount/signup.html b/akarpov/templates/socialaccount/signup.html new file mode 100644 index 0000000..959272e --- /dev/null +++ b/akarpov/templates/socialaccount/signup.html @@ -0,0 +1,26 @@ +{% extends "socialaccount/base.html" %} + +{% load i18n %} +{% load crispy_forms_tags %} + +{% block head_title %}{% trans "Signup" %}{% endblock %} + +{% block content %} +

{% trans "Sign Up" %}

+ +

{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to +{{site_name}}. As a final step, please complete the following form:{% endblocktrans %}

+ +
+ {% csrf_token %} + {{ form.media }} + {% for field in form %} + {{ field|as_crispy_field }} + {% endfor %} + {% if redirect_field_value %} + + {% endif %} + +
+ +{% endblock %} diff --git a/config/settings/base.py b/config/settings/base.py index 5731540..e42c4d1 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -74,7 +74,7 @@ "blog.post": {"ops": ("fetch", "get"), "timeout": 20 * 15}, "themes.theme": {"ops": ("fetch", "get"), "timeout": 60 * 60}, "gallery.*": {"ops": "all", "timeout": 60 * 15}, - "files.*": {"ops": ("fetch", "get"), "timeout": 60 * 5}, + "files.*": {"ops": ("fetch", "get"), "timeout": 60}, "auth.permission": {"ops": "all", "timeout": 60 * 15}, } CACHEOPS_REDIS = env.str("REDIS_URL") @@ -159,8 +159,8 @@ ALLAUTH_PROVIDERS = [ "allauth.socialaccount.providers.github", "allauth.socialaccount.providers.google", - "allauth.socialaccount.providers.telegram", - "allauth.socialaccount.providers.yandex", + # "allauth.socialaccount.providers.telegram", TODO + # "allauth.socialaccount.providers.yandex", TODO ] LOCAL_APPS = [