{{ ansible_header | comment }} # A secret key used by the server. SECRET_KEY = "{{ constellation.django_secret_key }}" # Should the server run in debug mode ? # SECURITY WARNING: don't run with debug turned on in production! DEBUG = {{ constellation.debug }} # A list of admins of the services. Receive mails when an error occurs ADMINS = [{% for admin in constellation.admins %}{{ admin }}, {% endfor %}] # The list of hostname the server will respond to. ALLOWED_HOSTS = [{% for host in constellation.allowed_hosts %}'{{ host }}', {% endfor %}] # Installed applications LOCAL_APPS = [ {% for app in constellation.applications %} '{{ app }}', {% endfor %} ] # Activate this option if a web front is needed USE_FRONT = {{ constellation.front }} # The time zone the server is runned in TIME_ZONE = 'Europe/Paris' # The storage systems parameters to use DATABASES = { 'default': { # The DB 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '{{ constellation.database.name }}', 'USER': '{{ constellation.database.user }}', 'PASSWORD': "{{ constellation.database.password }}", 'HOST': '{{ constellation.database.host }}', 'PORT': '{{ constellation.database.port }}', }, } {% if constellation.version == "master" %} {% if constellation.front %} STATIC_ROOT = "/var/lib/constellation/static/" {% endif %} MEDIA_ROOT = "/var/lib/constellation/media/" {% endif %} # The mail configuration for Constellation to send mails EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_USE_SSL = {{ constellation.email.ssl }} EMAIL_HOST = '{{ constellation.email.host }}' EMAIL_PORT = {{ constellation.email.port }} EMAIL_HOST_USER = '{{ constellation.email.user }}' EMAIL_HOST_PASSWORD = '{{ constellation.email.password }}' SERVER_EMAIL = '{{ constellation.email.from }}' DEFAULT_FROM_EMAIL = '{{ constellation.email.from_full }}' {% if constellation.front %} {% if constellation.comnpay is defined %} COMNPAY_ID_TPE = '{{ constellation.comnpay.tpe }}' COMNPAY_SECRET_KEY = '{{ constellation.comnpay.secret }}' {% endif %} {% if constellation.stripe is defined %} STRIPE_PRIVATE_KEY = "{{ constellation.stripe.private_key }}" STRIPE_PUBLIC_KEY = "{{ constellation.stripe.public_key }}" {% endif %} {% if constellation.note is defined %} NOTE_KFET_URL = "{{ constellation.note.url }}" NOTE_KFET_CLIENT_ID = "{{ constellation.note.client_id }}" NOTE_KFET_CLIENT_SECRET = "{{ constellation.note.client_secret }}" {% endif %} {% endif %}