mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Cleanup formatting of views.py
This commit is contained in:
@@ -11,12 +11,9 @@ from django.template import RequestContext
|
|||||||
from eve_api.api_exceptions import APIAuthException, APINoUserIDException
|
from eve_api.api_exceptions import APIAuthException, APINoUserIDException
|
||||||
from eve_api.api_puller.accounts import import_eve_account
|
from eve_api.api_puller.accounts import import_eve_account
|
||||||
from eve_api.models.api_player import EVEAccount, EVEPlayerCharacter
|
from eve_api.models.api_player import EVEAccount, EVEPlayerCharacter
|
||||||
|
|
||||||
from eve_proxy.models import ApiAccessLog
|
from eve_proxy.models import ApiAccessLog
|
||||||
|
|
||||||
from sso.models import ServiceAccount, Service, SSOUser, ExistingUser, ServiceError
|
from sso.models import ServiceAccount, Service, SSOUser, ExistingUser, ServiceError
|
||||||
from sso.forms import EveAPIForm, UserServiceAccountForm, ServiceAccountResetForm, RedditAccountForm, UserLookupForm, APIPasswordForm
|
from sso.forms import EveAPIForm, UserServiceAccountForm, ServiceAccountResetForm, RedditAccountForm, UserLookupForm, APIPasswordForm
|
||||||
|
|
||||||
from reddit.models import RedditAccount
|
from reddit.models import RedditAccount
|
||||||
|
|
||||||
import settings
|
import settings
|
||||||
@@ -41,7 +38,6 @@ def profile(request):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def characters(request, charid=0):
|
def characters(request, charid=0):
|
||||||
|
|
||||||
if charid:
|
if charid:
|
||||||
try:
|
try:
|
||||||
character = EVEPlayerCharacter.objects.get(id=charid)
|
character = EVEPlayerCharacter.objects.get(id=charid)
|
||||||
@@ -55,7 +51,6 @@ def characters(request, charid=0):
|
|||||||
chars = acc.characters.all()
|
chars = acc.characters.all()
|
||||||
for char in chars:
|
for char in chars:
|
||||||
characters.append({'id': char.id, 'name': char.name, 'corp': char.corporation.name})
|
characters.append({'id': char.id, 'name': char.name, 'corp': char.corporation.name})
|
||||||
|
|
||||||
except EVEAccount.DoesNotExist:
|
except EVEAccount.DoesNotExist:
|
||||||
characters = []
|
characters = []
|
||||||
|
|
||||||
@@ -94,7 +89,6 @@ def eveapi_add(request):
|
|||||||
def eveapi_del(request, userid=0):
|
def eveapi_del(request, userid=0):
|
||||||
|
|
||||||
if userid > 0 :
|
if userid > 0 :
|
||||||
|
|
||||||
try:
|
try:
|
||||||
acc = EVEAccount.objects.get(id=userid)
|
acc = EVEAccount.objects.get(id=userid)
|
||||||
except EVEAccount.DoesNotExist:
|
except EVEAccount.DoesNotExist:
|
||||||
@@ -122,7 +116,6 @@ def eveapi_refresh(request, userid=0):
|
|||||||
@login_required
|
@login_required
|
||||||
def eveapi_log(request, userid=0):
|
def eveapi_log(request, userid=0):
|
||||||
if userid > 0 :
|
if userid > 0 :
|
||||||
|
|
||||||
try:
|
try:
|
||||||
acc = EVEAccount.objects.get(id=userid)
|
acc = EVEAccount.objects.get(id=userid)
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user