for app in OPTIONAL_APPS: try: __import__(app["import"]) for name in app.get("apps", ()): if name not in INSTALLED_APPS: INSTALLED_APPS += (name,) MIDDLEWARE_CLASSES += app.get("middleware", ()) except ImportError: pass # Removes wagtail version update check banner from admin page. WAGTAIL_ENABLE_UPDATE_CHECK = False # Email ADMINS = admin_emails(os.environ.get('ADMIN_EMAILS')) if DEPLOY_ENVIRONMENT: EMAIL_SUBJECT_PREFIX = u'[{}] '.format(DEPLOY_ENVIRONMENT.title()) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' WAGTAILADMIN_NOTIFICATION_FROM_EMAIL = os.environ.get( 'WAGTAILADMIN_NOTIFICATION_FROM_EMAIL') # Password Policies # cfpb_common password rules CFPB_COMMON_PASSWORD_RULES = [ [r'.{12,}', 'Minimum allowed length is 12 characters'], [r'[A-Z]', 'Password must include at least one capital letter'], [r'[a-z]', 'Password must include at least one lowercase letter'],
if os.environ.get("S3_ENABLED", "False") == "True": AWS_ACCESS_KEY_ID = os.environ["AWS_ACCESS_KEY_ID"] AWS_SECRET_ACCESS_KEY = os.environ["AWS_SECRET_ACCESS_KEY"] if os.environ.get("AWS_S3_CUSTOM_DOMAIN"): AWS_S3_CUSTOM_DOMAIN = os.environ["AWS_S3_CUSTOM_DOMAIN"] DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" MEDIA_URL = os.path.join(os.environ.get("AWS_S3_URL"), AWS_LOCATION, "") # GovDelivery GOVDELIVERY_ACCOUNT_CODE = os.environ.get("GOVDELIVERY_ACCOUNT_CODE") # Removes wagtail version update check banner from admin page WAGTAIL_ENABLE_UPDATE_CHECK = False # Email ADMINS = admin_emails(os.environ.get("ADMIN_EMAILS")) if DEPLOY_ENVIRONMENT: EMAIL_SUBJECT_PREFIX = "[{}] ".format(DEPLOY_ENVIRONMENT.title()) EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" WAGTAILADMIN_NOTIFICATION_FROM_EMAIL = os.environ.get( "WAGTAILADMIN_NOTIFICATION_FROM_EMAIL") # Password Policies # cfpb_common password rules CFPB_COMMON_PASSWORD_RULES = [ [r".{12,}", "Minimum allowed length is 12 characters"], [r"[A-Z]", "Password must include at least one capital letter"], [r"[a-z]", "Password must include at least one lowercase letter"], [r"[0-9]", "Password must include at least one digit"],
for app in OPTIONAL_APPS: try: __import__(app["import"]) for name in app.get("apps", ()): if name not in INSTALLED_APPS: INSTALLED_APPS += (name, ) MIDDLEWARE_CLASSES += app.get("middleware", ()) except ImportError: pass # Removes wagtail version update check banner from admin page. WAGTAIL_ENABLE_UPDATE_CHECK = False # Email ADMINS = admin_emails(os.environ.get('ADMIN_EMAILS')) if DEPLOY_ENVIRONMENT: EMAIL_SUBJECT_PREFIX = u'[{}] '.format(DEPLOY_ENVIRONMENT.title()) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' WAGTAILADMIN_NOTIFICATION_FROM_EMAIL = os.environ.get( 'WAGTAILADMIN_NOTIFICATION_FROM_EMAIL') # Password Policies # cfpb_common password rules CFPB_COMMON_PASSWORD_RULES = [ [r'.{12,}', 'Minimum allowed length is 12 characters'], [r'[A-Z]', 'Password must include at least one capital letter'], [r'[a-z]', 'Password must include at least one lowercase letter'], [r'[0-9]', 'Password must include at least one digit'],