import os
import saml2
import saml2.saml
from django.utils.crypto import get_random_string
import django
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
DJANGO_ROOT = os.path.abspath(os.path.dirname(django.__file__))
BASE_DIR = PACKAGE_ROOT
### USER SETTINGS
DEBUG = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(PROJECT_ROOT, "dev.db"),
}
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
THEME_CONTACT_EMAIL = "team@lca2018.org"
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", get_random_string(length=64))
PINAX_STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "your test public key")
PINAX_STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "your test secret key")
PINAX_STRIPE_SEND_EMAIL_RECEIPTS = False
saml2_entityid = 'http://example.com/saml2/metadata/'
saml2_sp_name = 'Federated Django sample SP'
saml2_sp_assertion_service = 'http://example.com/saml2/acs/'
saml2_sp_slo_rdir = 'http://example.com/saml2/ls/'
smal2_sp_slo_post = 'http://example.com/saml2/ls/post'
saml2_base_dir = os.path.join(PACKAGE_ROOT, 'saml2')
saml2_idp_metadata = {
'local': [os.path.join(saml2_base_dir, 'remote_metadata.xml')],
},
saml2_signing_key = os.path.join(saml2_base_dir, 'cert.key')
saml2_signing_crt = os.path.join(saml2_base_dir, 'cert.pem')
saml2_encr_key = os.path.join(saml2_base_dir, 'enc.key')
saml2_encr_crt = os.path.join(saml2_base_dir, 'enc.crt')
saml2_contact = [
{'given_name': os.environ.get("META_GIVEN_NAME", 'Bastard'),
'sur_name': os.environ.get('META_FAM_NAME', 'Operator'),
'company': os.environ.get('META_COMPANY', 'Corp1'),
'email_address': os.environ.get('META_EMAIL', 'op@example.com'),
'contact_type': 'technical'},
],
@@ -62,41 +63,43 @@ ALLOWED_HOSTS = ['lca2018.org', '127.0.0.1', 'localhost']
TIME_ZONE = "Australia/Sydney"
DATE_FORMAT = "j F Y"
LANGUAGE_CODE = "en-au"
SITE_ID = int(os.environ.get("SITE_ID", 1))
USE_I18N = True
USE_L10N = True
USE_TZ = True
MEDIA_ROOT = os.path.join(PACKAGE_ROOT, "site_media", "media")
MEDIA_URL = "/site_media/media/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, "static", "distx")
STATIC_ROOT = os.path.join(PROJECT_ROOT, "static")
STATIC_URL = "/static/dist/"
STATICFILES_DIRS = [
os.path.join(PROJECT_ROOT, "static", "dist"),
]
STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(PACKAGE_ROOT, "templates"),
os.path.join(DJANGO_ROOT, 'forms/templates')
"APP_DIRS": True,
"OPTIONS": {
"debug": DEBUG,
"context_processors": [
"django.contrib.auth.context_processors.auth",
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.template.context_processors.request",