updated allauth login

This commit is contained in:
Alexander Karpov 2023-12-07 12:49:58 +03:00
parent e38888e411
commit 43aeb2290d
2 changed files with 29 additions and 3 deletions

View File

@ -0,0 +1,26 @@
{% extends "socialaccount/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% trans "Signup" %}{% endblock %}
{% block content %}
<h1>{% trans "Sign Up" %}</h1>
<p>{% 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 %}</p>
<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
{% csrf_token %}
{{ form.media }}
{% for field in form %}
{{ field|as_crispy_field }}
{% endfor %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<button class="btn btn-success" type="submit">{% trans "Sign Up" %} &raquo;</button>
</form>
{% endblock %}

View File

@ -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 = [