diff --git a/sso/views.py b/sso/views.py index 07efad9..691e702 100644 --- a/sso/views.py +++ b/sso/views.py @@ -37,21 +37,6 @@ def profile(request): profile = SSOUser(user=request.user) profile.save() - try: - srvaccounts = ServiceAccount.objects.filter(user=request.user).all() - except ServiceAccount.DoesNotExist: - srvaccounts = None - - try: - redditaccounts = RedditAccount.objects.filter(user=request.user).all() - except ServiceAccount.DoesNotExist: - redditaccounts = None - - try: - eveaccounts = EVEAccount.objects.filter(user=request.user).all() - except EVEAccount.DoesNotExist: - eveaccounts = None - return render_to_response('sso/profile.html', locals(), context_instance=RequestContext(request)) @login_required diff --git a/templates/sso/profile.html b/templates/sso/profile.html index 6d59eea..ec4276a 100644 --- a/templates/sso/profile.html +++ b/templates/sso/profile.html @@ -17,17 +17,17 @@
To reset your External API Auth Services password, which is used to access tools and websites which use Auth's API, click the link below
Reset External API Auth Services Password
-{% if eveaccounts %} +{% if user.eveaccount_set.all %}This is a list of all your current non-api external service accounts, to create a login for a service click the Add Service link
-{% if srvaccounts %} +{% if user.serviceaccount_set.all %}| Service | Username | URL | Active | Actions | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ acc.service }} | {{ acc.service_uid }} | {{ acc.service.url }} | @@ -60,13 +60,13 @@ corporation. Limited keys are accepted for service validation. API keys are stored for on-going authentication. As the assigned owner of a key you may remove them at any time, but this may affect any existing services you have setup. -{% if eveaccounts %} +{% if user.eveaccount_set.all %}
| User ID | API Key | Description | Type | Active | Last Updated | Actions | ||
|---|---|---|---|---|---|---|---|---|
| {{ acc.api_user_id }} | {{ acc.api_key }} | {{ acc.description }} | @@ -89,14 +89,14 @@ setup.
| Username | Created Date | Validated |
|---|---|---|
| {{ acc.username }} | {{ acc.date_created }} | {% if acc.validated %}Yes{% else %}No (Validate){% endif %} |