# 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',
        }
    },
}

## 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 = 'keyserver.ubuntu.com'

TIER0_MIRROR_DOMAIN = 'repos.archlinux.org'
#TIER0_MIRROR_SECRET = '{{ vault_archweb_x_sent_from_secret }}'

# vim: set ts=4 sw=4 et:
