

def host_theme_path():
    '\n    Returns the directory of the theme associated with the given host.\n    '
    domain = None
    for (host, theme) in settings.HOST_THEMES:
        if (domain is None):
            domain = Site.objects.get(id=current_site_id()).domain
        if (host.lower() == domain.lower()):
            try:
                __import__(theme)
                module = sys.modules[module]
            except ImportError:
                pass
            else:
                return os.path.dirname(os.path.abspath(module.__file__))
    return ''

dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/utils/sites.py host_theme_path/VarMisuse@87/127 `theme`->`module`