From bd761ec197b91de8a769b875b4d535b22667ea94 Mon Sep 17 00:00:00 2001 From: superqwer Date: Mon, 6 Apr 2015 15:58:42 +0300 Subject: [PATCH] relative import fix --- django_select2/memcache_wrapped_db_client.py | 4 ++-- django_select2/util.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/django_select2/memcache_wrapped_db_client.py b/django_select2/memcache_wrapped_db_client.py index 2e77797..8860bc4 100644 --- a/django_select2/memcache_wrapped_db_client.py +++ b/django_select2/memcache_wrapped_db_client.py @@ -8,11 +8,11 @@ class Client(object): def __init__(self, hostname="127.0.0.1", port="11211", expiry=900): if hostname and port: - import memcache_client + from . import memcache_client self.cache = memcache_client.Client(hostname, port, expiry) - import db_client + from . import db_client self.db = db_client.Client() diff --git a/django_select2/util.py b/django_select2/util.py index f2f811f..da19700 100644 --- a/django_select2/util.py +++ b/django_select2/util.py @@ -78,7 +78,7 @@ def is_valid_id(val): if ENABLE_MULTI_PROCESS_SUPPORT: - from memcache_wrapped_db_client import Client + from .memcache_wrapped_db_client import Client remote_server = Client(MEMCACHE_HOST, binary_type(MEMCACHE_PORT), MEMCACHE_TTL)