Remove EveManager, refactor into model managers

Lots of unused methods removed.
Unit tests added for those that are left.
This commit is contained in:
Basraah
2017-09-21 14:56:40 +10:00
parent f84de28338
commit f36b038010
12 changed files with 384 additions and 196 deletions

View File

@@ -16,7 +16,7 @@ from django.shortcuts import render, redirect, get_object_or_404
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from esi.decorators import token_required
from allianceauth.eveonline.managers import EveManager
from allianceauth.eveonline.providers import provider
from .forms import FatlinkForm
from .models import Fatlink, Fat
from slugify import slugify
@@ -248,7 +248,7 @@ def click_fatlink_view(request, token, hash, fatname):
if (timezone.now() - fatlink.fatdatetime) < datetime.timedelta(seconds=(fatlink.duration * 60)):
character = EveManager.get_character_by_id(token.character_id)
character = EveCharacter.objects.get_character_by_id(token.character_id)
if character:
# get data
@@ -267,7 +267,7 @@ def click_fatlink_view(request, token, hash, fatname):
'name']
else:
location['station_name'] = "No Station"
ship['ship_type_name'] = EveManager.get_itemtype(ship['ship_type_id']).name
ship['ship_type_name'] = provider.get_itemtype(ship['ship_type_id']).name
fat = Fat()
fat.system = location['solar_system_name']