'''Nuit autoconfig'''
import django


SETTINGS = {
    'TEMPLATE_CONTEXT_PROCESSORS': [
        'django.core.context_processors.request',
        'nuit.context_processors.nuit',
    ],
    'INSTALLED_APPS': [
        'django.contrib.staticfiles',
        'foundation_scss',
        'foundation_icons',
        'jquery',
        'bourbon',
        'pipeline',
    ],
    'PIPELINE': {
        'COMPILERS': (
            'pipeline.compilers.sass.SASSCompiler',
        ),
        'CSS_COMPRESSOR': None,
        'SASS_ARGUMENTS': '--quiet',
        'STYLESHEETS': {
            'nuit': {
                'source_filenames': (
                  'nuit.scss',
                ),
                'output_filename': 'nuit.css',
            },
        },
    },
    'STATICFILES_FINDERS': [
        'pipeline.finders.PipelineFinder',
    ],
    'STATICFILES_STORAGE': 'pipeline.storage.PipelineStorage',
    'TEMPLATES': [
        {
            'BACKEND': 'django.template.backends.django.DjangoTemplates',
            'APP_DIRS': True,
            'OPTIONS': {
                'context_processors': [
                    'django.template.context_processors.request',
                    'nuit.context_processors.nuit',
                ],
            },
        },
    ],
}

if django.VERSION >= (1,9):
    SETTINGS['TEMPLATES'][0]['OPTIONS']['builtins'] = [
        'nuit.templatetags.nuit',
    ]

# We need to add this globally as we're making a new ExtendsNode
# and this needs to be the first node in the template.
try:
    from django.template.base import add_to_builtins
except ImportError:
    pass
else:
    add_to_builtins('nuit.templatetags.nuit')

@@ -44,16 +44,462 @@
 NGS = %7B%0A
+    # For use with django-csp%0A    'CSP_STYLE_SRC': (%0A        %22'self'%22,%0A        # modernizr.js%0A        %22'sha256-CwE3Bg0VYQOIdNAkbB/Btdkhul49qZuwgNCMPgNY5zw='%22,%0A        %22'sha256-LpfmXS+4ZtL2uPRZgkoR29Ghbxcfime/CsD/4w5VujE='%22,%0A        %22'sha256-MZKTI0Eg1N13tshpFaVW65co/LeICXq4hyVx6GWVlK0='%22,%0A        %22'sha256-YJO/M9OgDKEBRKGqp4Zd07dzlagbB+qmKgThG52u/Mk='%22,%0A        # jquery.js%0A        %22'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='%22,%0A    ),%0A
     'TEM

Add CSP allows for styles, so nuit works with django-csp