# Path: common_configs/services/aws.py
# class AWS(object):
# 
#     #: AWS access key id retrieved from ``AWS_ACCESS_KEY_ID`` environment setting
#     AWS_ACCESS_KEY_ID = values.SecretValue(environ_prefix=None)
# 
#     #: AWS secret key retrieved from ``AWS_SECRET_ACCESS_KEY`` environment setting
#     AWS_SECRET_ACCESS_KEY = values.SecretValue(environ_prefix=None)
# 
# Path: common_configs/utils.py
# def merge_items(base, new_items):
#     """
#     Merges two lists and eliminates duplicates
# 
#     :type base: list
#     :type new_items: list
#     :rtype: list
#     """
#     for item in new_items:
#         if not item in base:
#             base = base + [item]
#     return base


import datetime
import time
from django.utils.http import http_date
from configurations import values
from ..services.aws import AWS
from ..utils import merge_items
        from boto.s3.connection import SubdomainCallingFormat

    @property
    def STATIC_URL(self):
        """
        Base url for static files
        """
        if self.AWS_CLOUDFRONT_URL:
            return "{}{}/".format(self.AWS_CLOUDFRONT_URL, "static")
        return self.get_aws_url(
            "static", bucket=self.AWS_STORAGE_BUCKET_NAME,
            calling_format=self.AWS_S3_CALLING_FORMAT, secure=self.AWS_S3_SECURE_URLS
        )

    @property
    def MEDIA_URL(self):
        """
        Base url for media files
        """
        if self.AWS_CLOUDFRONT_URL:
            return "{}{}/".format(self.AWS_CLOUDFRONT_URL, "media")
        return self.get_aws_url(
            "media", bucket=self.AWS_STORAGE_BUCKET_NAME,
            calling_format=self.AWS_S3_CALLING_FORMAT, secure=self.AWS_S3_SECURE_URLS
        )

    @property
    def INSTALLED_APPS(self):
        """
        Appends :mod:`collectfast` to list of ``INSTALLED_APPS``.
        """

# Path: common_configs/services/aws.py
# class AWS(object):
# 
#     #: AWS access key id retrieved from ``AWS_ACCESS_KEY_ID`` environment setting
#     AWS_ACCESS_KEY_ID = values.SecretValue(environ_prefix=None)
# 
#     #: AWS secret key retrieved from ``AWS_SECRET_ACCESS_KEY`` environment setting
#     AWS_SECRET_ACCESS_KEY = values.SecretValue(environ_prefix=None)
# 
# Path: common_configs/utils.py
# def merge_items(base, new_items):
#     """
#     Merges two lists and eliminates duplicates
# 
#     :type base: list
#     :type new_items: list
#     :rtype: list
#     """
#     for item in new_items:
#         if not item in base:
#             base = base + [item]
#     return base


# Path: common_configs/storage/storage.py
import datetime
import time
from django.utils.http import http_date
from configurations import values
from ..services.aws import AWS
from ..utils import merge_items
        from boto.s3.connection import SubdomainCallingFormat


    @property
    def STATIC_URL(self):
        """
        Base url for static files
        """
        if self.AWS_CLOUDFRONT_URL:
            return "{}{}/".format(self.AWS_CLOUDFRONT_URL, "static")
        return self.get_aws_url(
            "static", bucket=self.AWS_STORAGE_BUCKET_NAME,
            calling_format=self.AWS_S3_CALLING_FORMAT, secure=self.AWS_S3_SECURE_URLS
        )

    @property
    def MEDIA_URL(self):
        """
        Base url for media files
        """
        if self.AWS_CLOUDFRONT_URL:
            return "{}{}/".format(self.AWS_CLOUDFRONT_URL, "media")
        return self.get_aws_url(
            "media", bucket=self.AWS_STORAGE_BUCKET_NAME,
            calling_format=self.AWS_S3_CALLING_FORMAT, secure=self.AWS_S3_SECURE_URLS
        )

    @property
    def INSTALLED_APPS(self):
        """
        Appends :mod:`collectfast` to list of ``INSTALLED_APPS``.
        """

        return merge_items(super(AWSCompressStorage, self).INSTALLED_APPS, [