Fix stations import and EVE API Connection calls.

This commit is contained in:
2013-11-11 21:12:35 +00:00
parent c8f503f053
commit 813358271d
3 changed files with 18 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ from eveapi import EVEAPIConnection
from evesde.models.cache import EVEAPICache
class EVEAPICache(object):
class EVEAPICacheHandler(object):
def hash(self, data):
from hashlib import sha1
@@ -40,6 +40,6 @@ class EVEAPICache(object):
def get_api_connection():
cache_handler = getattr(settings, 'EVE_SDE_CACHE_HANDLER', 'evesde.eveapi.EVEAPICache')
cache_handler = getattr(settings, 'EVE_SDE_CACHE_HANDLER', 'evesde.eveapi.EVEAPICacheHandler')
cache_obj = import_by_path(cache_handler)
return EVEAPIConnection(cacheHandler=cache_obj)
return EVEAPIConnection(cacheHandler=cache_obj())

View File

@@ -18,6 +18,9 @@ def import_conquerable_stations():
obj = Station(pk=station.stationID)
obj.name = station.stationName
obj.system_id = station.solarSystemID
obj.x = 0
obj.y = 0
obj.z = 0
objs.append(obj)
with transaction.atomic():