# 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/helpers.py
# def get_static_site_domain():
#     static_site_domain = settings.STATICGEN_STATIC_SITE_DOMAIN
#     if static_site_domain is None:
#         connection = connect_s3(
#             settings.AWS_ACCESS_KEY_ID,
#             settings.AWS_SECRET_ACCESS_KEY
#         )
#         bucket = connection.get_bucket(settings.AWS_STORAGE_BUCKET_NAME)
#         static_site_domain = bucket.get_website_endpoint()
#     return static_site_domain.rstrip('/')


import logging
from django.core.urlresolvers import resolve, reverse
from django.shortcuts import resolve_url
from django.test import Client
from django.utils import translation
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from .exceptions import StaticgenError
from .helpers import get_static_site_domain
from .status import is_success
                    return context_data['paginator'], context_data['is_paginated']
                except KeyError:  # pragma: no cover
                    pass
        return None, False

    def _urls(self, page):
        urls = []

        url = self.url(page)
        urls.append(url)  # first page

        if self.is_paginated:
            paginator, is_paginated = self._get_paginator(url)
            if paginator is not None and is_paginated:
                page_range = paginator.page_range
                match = resolve(url)
                for page_num in page_range:
                    kwargs = match.kwargs.copy()
                    kwargs.update({
                        'page': page_num
                    })
                    urls.append(reverse(match.view_name, args=match.args, kwargs=kwargs))

        return urls

    def get_urls(self):
        urls = []
        for page in self.items():
            if getattr(self, 'i18n', False):
                current_lang_code = translation.get_language()

# 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/helpers.py
# def get_static_site_domain():
#     static_site_domain = settings.STATICGEN_STATIC_SITE_DOMAIN
#     if static_site_domain is None:
#         connection = connect_s3(
#             settings.AWS_ACCESS_KEY_ID,
#             settings.AWS_SECRET_ACCESS_KEY
#         )
#         bucket = connection.get_bucket(settings.AWS_STORAGE_BUCKET_NAME)
#         static_site_domain = bucket.get_website_endpoint()
#     return static_site_domain.rstrip('/')


# Path: staticgen/staticgen_views.py
import logging
from django.core.urlresolvers import resolve, reverse
from django.shortcuts import resolve_url
from django.test import Client
from django.utils import translation
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from .exceptions import StaticgenError
from .helpers import get_static_site_domain
from .status import is_success

                    return context_data['paginator'], context_data['is_paginated']
                except KeyError:  # pragma: no cover
                    pass
        return None, False

    def _urls(self, page):
        urls = []

        url = self.url(page)
        urls.append(url)  # first page

        if self.is_paginated:
            paginator, is_paginated = self._get_paginator(url)
            if paginator is not None and is_paginated:
                page_range = paginator.page_range
                match = resolve(url)
                for page_num in page_range:
                    kwargs = match.kwargs.copy()
                    kwargs.update({
                        'page': page_num
                    })
                    urls.append(reverse(match.view_name, args=match.args, kwargs=kwargs))

        return urls

    def get_urls(self):
        urls = []
        for page in self.items():
            if getattr(self, 'i18n', False):
                current_lang_code = translation.get_language()

                for lang_code, lang_name in settings.LANGUAGES: