import shopify

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured


VERSION     = (0, 1, 5)
__version__ = '.'.join(map(str, VERSION))
__author__  = 'Gavin Ballard'


def initialize():
    if not settings.SHOPIFY_APP_API_KEY or not settings.SHOPIFY_APP_API_SECRET:
        raise ImproperlyConfigured("SHOPIFY_APP_API_KEY and SHOPIFY_APP_API_SECRET must be set in settings")
    shopify.Session.setup(api_key = settings.SHOPIFY_APP_API_KEY, secret = settings.SHOPIFY_APP_API_SECRET)
VERSION     = (0, 1, 6)
__version__ = '.'.join(map(str, VERSION))
__author__  = 'Gavin Ballard'


def initialize():
    import shopify

    from django.conf import settings
    from django.core.exceptions import ImproperlyConfigured

    if not settings.SHOPIFY_APP_API_KEY or not settings.SHOPIFY_APP_API_SECRET:
        raise ImproperlyConfigured("SHOPIFY_APP_API_KEY and SHOPIFY_APP_API_SECRET must be set in settings")
    shopify.Session.setup(api_key = settings.SHOPIFY_APP_API_KEY, secret = settings.SHOPIFY_APP_API_SECRET)
Move imports inside initialize() method so that we don’t break things on initial setup.
Move imports inside initialize() method so that we don’t break things on initial setup.