From: Rohan Jain Date: Mon, 13 Jun 2011 06:52:47 +0000 (+0530) Subject: Use association wise disconnection in example X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ef57ebd8250e0c1c296c5544b3347b784eb816f2;p=django-social-auth.git Use association wise disconnection in example Use the updated individual dissociation, added in commit 'dce385085b3fa1a47fa2620983079e8e69480118', in the example application --- diff --git a/example/app/views.py b/example/app/views.py index ecc9825..692a171 100644 --- a/example/app/views.py +++ b/example/app/views.py @@ -19,8 +19,10 @@ def home(request): @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)) diff --git a/example/templates/done.html b/example/templates/done.html index f5abc9b..be9390b 100644 --- a/example/templates/done.html +++ b/example/templates/done.html @@ -16,27 +16,33 @@
+

Disconnect accounts

+

Associate new OAuth credentials:

@@ -44,11 +50,9 @@ @@ -56,17 +60,14 @@