From c8f503f0534bc87d7065502a7f0fda20aca26540 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 11 Nov 2013 20:55:51 +0000 Subject: [PATCH] Load the cache handler for the EVEAPIConnection. --- evesde/eveapi/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evesde/eveapi/__init__.py b/evesde/eveapi/__init__.py index 4fe931d..6b89d0d 100644 --- a/evesde/eveapi/__init__.py +++ b/evesde/eveapi/__init__.py @@ -1,5 +1,7 @@ +import imp from datetime import timedelta from django.utils.timezone import now +from django.utils.module_loading import import_by_path from django.conf import settings from eveapi import EVEAPIConnection @@ -39,5 +41,5 @@ class EVEAPICache(object): def get_api_connection(): cache_handler = getattr(settings, 'EVE_SDE_CACHE_HANDLER', 'evesde.eveapi.EVEAPICache') - + cache_obj = import_by_path(cache_handler) return EVEAPIConnection(cacheHandler=cache_obj) \ No newline at end of file