47 lines
1.6 KiB
Django/Jinja
47 lines
1.6 KiB
Django/Jinja
{{ ansible_header | comment }}
|
|
|
|
# A secret key used by the server.
|
|
SECRET_KEY = "{{ printer.django_secret_key }}"
|
|
|
|
# Should the server run in debug mode ?
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = {{ printer.debug }}
|
|
|
|
# A list of admins of the services. Receive mails when an error occurs
|
|
ADMINS = [{% for admin in printer.admins %}{{ admin }}, {% endfor %}]
|
|
|
|
# The list of hostname the server will respond to.
|
|
ALLOWED_HOSTS = [{% for host in printer.allowed_hosts %}'{{ host }}', {% endfor %}]
|
|
|
|
# The storage systems parameters to use
|
|
DATABASES = {
|
|
'default': { # The DB
|
|
'ENGINE': 'django.db.backends.postgresql',
|
|
'NAME': '{{ printer.database.name }}',
|
|
'USER': '{{ printer.database.user }}',
|
|
'PASSWORD': "{{ printer.database.password }}",
|
|
'HOST': '{{ printer.database.host }}',
|
|
'PORT': '{{ printer.database.port }}',
|
|
},
|
|
}
|
|
|
|
{% if printer.version == "main" %}
|
|
STATIC_ROOT = "/var/lib/django-printer/static/"
|
|
|
|
{% endif %}
|
|
MEDIA_ROOT = "/var/lib/django-printer/files/"
|
|
|
|
# The mail configuration to send mails
|
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|
EMAIL_USE_SSL = {{ printer.email.ssl }}
|
|
EMAIL_HOST = '{{ printer.email.host }}'
|
|
EMAIL_PORT = {{ printer.email.port }}
|
|
EMAIL_HOST_USER = '{{ printer.email.user }}'
|
|
EMAIL_HOST_PASSWORD = '{{ printer.email.password }}'
|
|
SERVER_EMAIL = '{{ printer.email.from }}'
|
|
DEFAULT_FROM_EMAIL = '{{ printer.email.from_full }}'
|
|
|
|
NOTE_KFET_URL = "{{ printer.note.url }}"
|
|
NOTE_KFET_CLIENT_ID = "{{ printer.note.client_id }}"
|
|
NOTE_KFET_CLIENT_SECRET = "{{ printer.note.client_secret }}"
|