# Path: staticgen/conf.py
# class StaticgenConf(AppConf):
#     class Meta:
#     SITEMAP_URL = None
#     FAIL_SILENTLY = True
#     MULTITHREAD = True
#     BUCKET_NAME = getattr(settings, 'AWS_STORAGE_BUCKET_NAME', '')
#     STATIC_SITE_DOMAIN = None
# 
# Path: staticgen/exceptions.py
# class StaticgenError(Exception):
#     pass


import logging
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from .exceptions import StaticgenError
    from importlib import import_module
    from django.utils.importlib import import_module
        from .staticgen_views import StaticgenView
    def __init__(self):
        self._discovered = False
        self.modules = {}

    def log_error(self, message):
        logger.error(message)
        if not settings.STATICGEN_FAIL_SILENTLY:
            raise StaticgenError(message)

    def register(self, cls):
        if not issubclass(cls, StaticgenView):
            message = _('Staticgen Views must inherit '
                        '"staticgen.staticgen_views.StaticgenView", '
                        '{cls} does not').format(cls=cls)
            self.log_error(message)
            return False  # pragma: no cover

        name = '{module}.{name}'.format(module=cls.__module__, name=cls.__name__)
        if name in self.modules.keys():
            message = _('"{name}" a Staticgen view with this name '
                        'is already registered'.format(name=name))
            self.log_error(message)
            return False  # pragma: no cover

        self.modules[name] = cls()

    def autodiscover(self):
        if self._discovered:  # pragma: no cover
            return


# Path: staticgen/conf.py
# class StaticgenConf(AppConf):
#     class Meta:
#     SITEMAP_URL = None
#     FAIL_SILENTLY = True
#     MULTITHREAD = True
#     BUCKET_NAME = getattr(settings, 'AWS_STORAGE_BUCKET_NAME', '')
#     STATIC_SITE_DOMAIN = None
# 
# Path: staticgen/exceptions.py
# class StaticgenError(Exception):
#     pass


# Path: staticgen/staticgen_pool.py
import logging
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from .exceptions import StaticgenError
    from importlib import import_module
    from django.utils.importlib import import_module
        from .staticgen_views import StaticgenView

    def __init__(self):
        self._discovered = False
        self.modules = {}

    def log_error(self, message):
        logger.error(message)
        if not settings.STATICGEN_FAIL_SILENTLY:
            raise StaticgenError(message)

    def register(self, cls):
        if not issubclass(cls, StaticgenView):
            message = _('Staticgen Views must inherit '
                        '"staticgen.staticgen_views.StaticgenView", '
                        '{cls} does not').format(cls=cls)
            self.log_error(message)
            return False  # pragma: no cover

        name = '{module}.{name}'.format(module=cls.__module__, name=cls.__name__)
        if name in self.modules.keys():
            message = _('"{name}" a Staticgen view with this name '
                        'is already registered'.format(name=name))
            self.log_error(message)
            return False  # pragma: no cover

        self.modules[name] = cls()

    def autodiscover(self):
        if self._discovered:  # pragma: no cover
            return


        for app in settings.INSTALLED_APPS: