@login_required
def done(request):
"""Login complete view, displays user data"""
- names = request.user.social_auth.values_list('provider', flat=True)
- ctx = dict((name.lower().replace('-', '_'), True) for name in names)
+ names = request.user.social_auth.all()
+ ctx = {
+ 'names':names,
+ }
ctx['version'] = version
ctx['last_login'] = request.session.get('social_auth_last_login_backend')
return render_to_response('done.html', ctx, RequestContext(request))
</div>
<div>
+ <h3>Disconnect accounts</h3>
+ <ul>
+ {% for account in names %}
+ <li>
+ <span class="disconnect">
+ <a href={% url disconnect-individual account.provider account.id %}>{{ account.provider }} ({{ account.id }})</a>
+ </span>
+ </br>
+ </li>
+ {% endfor %}
+ </ul>
<h3>Associate new OAuth credentials:</h3>
<ul>
<li>
<a rel="nofollow" href="{% url associate_begin "twitter" %}">Twitter</a>
- {% if twitter %}<span class="disconnect">(<a href="{% url disconnect "twitter" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<a rel="nofollow" href="{% url associate_begin "facebook" %}">Facebook</a>
- {% if facebook %}<span class="disconnect">(<a href="{% url disconnect "facebook" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<a rel="nofollow" href="{% url associate_begin "linkedin" %}">LinkedIn</a>
- {% if linkedin %}<span class="disconnect">(<a href="{% url disconnect "linkedin" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<a rel="nofollow" href="{% url associate_begin "orkut" %}">Orkut</a>
- {% if orkut %}<span class="disconnect">(<a href="{% url disconnect "orkut" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<a rel="nofollow" href="{% url associate_begin "google-oauth" %}">Google OAuth</a>
- {% if google_oauth %}<span class="disconnect">(<a href="{% url disconnect "google-oauth" %}">disconnect</a>)</span>{% endif %}
</li>
</ul>
<ul>
<li>
<a rel="nofollow" href="{% url associate_begin "google-oauth2" %}">Google OAuth2</a>
- {% if google_oauth2 %}<span class="disconnect">(<a href="{% url disconnect "google-oauth2" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<a rel="nofollow" href="{% url associate_begin "foursquare" %}">Foursquare</a>
- {% if foursquare %}<span class="disconnect">(<a href="{% url disconnect "foursquare" %}">disconnect</a>)</span>{% endif %}
</li>
</ul>
<ul>
<li>
<a rel="nofollow" href="{% url associate_begin "google" %}">Google OpenID</a>
- {% if google %}<span class="disconnect">(<a href="{% url disconnect "google" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<a rel="nofollow" href="{% url associate_begin "yahoo" %}">Yahoo</a>
- {% if yahoo %}<span class="disconnect">(<a href="{% url disconnect "yahoo" %}">disconnect</a>)</span>{% endif %}
</li>
<li>
<form action="{% url associate_begin "livejournal" %}" method="post">{% csrf_token %}
<div>
<label for="openid_lj_user">LiveJournal user
- {% if livejournal %}(<span class="disconnect"><a href="{% url disconnect "livejournal" %}">disconnect</a>)</span>{% endif %}
</label>
<input id="openid_lj_user" type="text" value="" name="openid_lj_user" />
<input type="submit" value="Login"/>