1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/archweb/templates/local_settings.py.j2
2020-06-05 23:19:42 +02:00

75 lines
1.8 KiB
Django/Jinja

# Django settings for archlinux project.
## Debug settings
DEBUG = False
TEMPLATE_DEBUG = False
## Notification admins
{% if archweb_admins %}
ADMINS = (
{% for admin in archweb_admins %}
{{ admin }},
{% endfor %}
)
{% else %}
ADMINS = ()
{% endif %}
SERVER_EMAIL = '{{ archweb_server_email }}'
EMAIL_HOST = '127.0.0.1'
EMAIL_PORT = 25
DATABASES = {
'default': {
'ENGINE' : 'django.db.backends.postgresql_psycopg2',
'PORT' : 5432,
{% if archweb_db_host != 'localhost' %}
'HOST' : '{{ archweb_db_host }}',
{% endif %}
'NAME' : '{{ archweb_db }}',
'USER' : '{{ archweb_db_site_user }}',
'PASSWORD': '{{ vault_archweb_db_site_password }}',
'OPTIONS' : {
'application_name': 'archweb',
{% if archweb_db_host != 'localhost' %}
'sslmode': 'require',
{% endif %}
}
},
}
## Define cache settings
CACHES = {
'default': {
'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'unix:/run/memcached/archweb.sock',
}
}
## Use secure session cookies? Make this true if you want all
## logged-in actions to take place over HTTPS only. If developing
## locally, you will want to use False.
SESSION_COOKIE_SECURE = True
## static files URL
STATIC_URL = '/static/'
## location for saving dev pictures
MEDIA_ROOT = '{{ archweb_dir }}/media/img'
## web url for serving image files
MEDIA_URL = '/img/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '{{ vault_archweb_secret_key }}'
# Mailman poster password for announcements
MAILMAN_PASSWORD = '{{ vault_archweb_mailman_password }}'
# Hostnames we allow this site to be served under
ALLOWED_HOSTS = [{% for host in archweb_allowed_hosts %}'{{ host }}', {% endfor -%}]
PGP_SERVER = 'pgp.mit.edu'
# vim: set ts=4 sw=4 et: