Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Merge pull request #56 from mdn/update_django_allauth_1153288
Browse files Browse the repository at this point in the history
Update django-allauth to 0.23.0

+r jezedz
  • Loading branch information
jwhitlock committed Sep 28, 2015
2 parents 23b9561 + 64f8418 commit 2738f14
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion bcauth/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from allauth.account.utils import user_display
from allauth.socialaccount import providers
from allauth.socialaccount.templatetags.socialaccount import \
get_social_accounts
get_social_accounts, get_providers

from jinja2 import contextfunction
from jingo import register
Expand Down Expand Up @@ -56,3 +56,4 @@ def provider_login_url(

register.function(user_display)
register.function(get_social_accounts)
register.function(get_providers)
7 changes: 4 additions & 3 deletions bcauth/templates/account/login.jinja2
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{% extends "account/base.jinja2" %}
{% from "socialaccount/snippets/provider_list.jinja2" import list %}
{% set providers = get_providers() %}

{% block head_title %}{{ _("Sign In") }}{% endblock %}
{% block body_title %}{{ _("Sign In") }}{% endblock %}

{% block content %}
{% if socialaccount.providers %}
{% if providers %}
<p>{% trans site_name=site.name %}Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{site_name}} account and sign in below:{% endtrans %}</p>

<div class="socialaccount_ballot">

<ul class="socialaccount_providers">
{{ list(request, socialaccount.providers, process='login') }}
{{ list(request, providers, process='login') }}
</ul>

<div class="login-or">{{ _('or') }}</div>
Expand All @@ -40,7 +41,7 @@ for a {{site_name}} account and sign in below:{% endtrans %}</p>
{% endblock %}

{% block body_js_extra %}
{% if socialaccount.providers %}
{% if providers %}
{{ providers_media_js() }}
{% endif %}
{% endblock %}
5 changes: 3 additions & 2 deletions bcauth/templates/socialaccount/connections.jinja2
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends "account/profile.jinja2" %}
{% from "socialaccount/snippets/provider_list.jinja2" import list %}
{% set providers = get_providers() %}

{% block head_subtitle %} - {{ _("Account Connections") }}{% endblock %}
{% block body_title %}{{ _("Account Connections") }}{% endblock %}
Expand Down Expand Up @@ -48,13 +49,13 @@
<h2>{{ _('Add a 3rd Party Account') }}</h2>

<ul class="socialaccount_providers">
{{ list(request, socialaccount.providers, process='connect') }}
{{ list(request, providers, process='connect') }}
</ul>

{% endblock %}

{% block body_js_extra %}
{% if socialaccount.providers %}
{% if providers %}
{{ providers_media_js() }}
{% endif %}
{% endblock %}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ git+git://github.com/erikrose/parsimonious@20863d86a#egg=parsimonious
requests==2.7.0
oauthlib==1.0.3
requests-oauthlib==0.5.0
django-allauth==0.20.0
django-allauth==0.23.0
2 changes: 0 additions & 2 deletions wpcsite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ def rel_path(*subpaths):
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.request",
"django.contrib.messages.context_processors.messages",
"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
)

# Email settings
Expand Down

0 comments on commit 2738f14

Please sign in to comment.