0.12.5 google auth fix
This commit is contained in:
@@ -117,7 +117,11 @@ def logout_View(request):
|
||||
|
||||
def login_View(request):
|
||||
|
||||
Dict = {}
|
||||
from allauth.socialaccount.models import SocialApp
|
||||
auth_google_allow = SocialApp.objects.filter(provider='google')
|
||||
Dict = {
|
||||
'auth_google_allow': auth_google_allow
|
||||
}
|
||||
|
||||
t = loader.get_template('pages/profile/p_login.html')
|
||||
return get_inter_http_respose(t, Dict, request)
|
||||
|
||||
@@ -30,13 +30,17 @@
|
||||
</div>
|
||||
<div class="button_register"><button onclick="SendLoginForm(this)">{% translate "Войти" %}</button></div>
|
||||
<div class="agree_text_l">{% translate "Авторизуясь, вы соглашаетесь с Лицензионным соглашением Политикой конфиденциальности" %}</div>
|
||||
|
||||
{% if auth_google_allow %}
|
||||
<div id="reg_or_text">{% translate "Или" %}</div>
|
||||
|
||||
|
||||
<a href="{% provider_login_url 'google' %}">
|
||||
<div id = "google_text" class="google"><img src="/static/img/png/google.png" alt="">
|
||||
<div> {% translate "Войти через" %} Google</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="call_to_reg">{% translate "Нет аккаунта?" %} <a href="/ru/profile/registration/">{% translate "Зарегистрируйтесь" %}</a></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user