local_settings.py.j2 1.68 KB
Newer Older
1
2
3
4
#
# {{ ansible_managed }}
#

5
6
# Django settings for archlinux project.

7
8
9
10
11
## Debug settings
DEBUG = False
TEMPLATE_DEBUG = False

## Notification admins
12
{% if archweb_admins %}
13
ADMINS = (
14
15
16
{% for admin in archweb_admins %}
    {{ admin }},
{% endfor %}
17
)
18
19
20
{% else %}
ADMINS = ()
{% endif %}
21
22

SERVER_EMAIL = 'archweb@archlinux.org'
23
24
EMAIL_HOST = '127.0.0.1'
EMAIL_PORT = 10027
25
26
27
28

DATABASES = {
    'default': {
        'ENGINE'  : 'django.db.backends.postgresql_psycopg2',
29
        'PORT'    : 5432,
30
31
32
33
34
35
{% if archweb_db_host != 'localhost' %}
        'HOST'    : '{{ archweb_db_host }}',
{% endif %}
        'NAME'    : '{{ archweb_db }}',
        'USER'    : '{{ archweb_db_site_user }}',
        'PASSWORD': '{{ archweb_db_site_password }}',
36
37
38
39
40
41
        'OPTIONS' : {
            'application_name': 'archweb',
{% if archweb_db_host != 'localhost' %}
            'sslmode': 'require',
{% endif %}
        }
42
43
44
45
46
47
48
    },
}

## Define cache settings
CACHES = {
    'default': {
        'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
49
        'LOCATION': 'unix:/run/memcached/archweb.sock',
50
51
52
    }
}

53
54
55
56
57
58
59
60
61
## 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
62
MEDIA_ROOT = '{{ archweb_dir }}/media/img'
63
64
65
66
67

## web url for serving image files
MEDIA_URL = '/img/'

# Make this unique, and don't share it with anybody.
68
SECRET_KEY = '{{ archweb_secret_key }}'
69
70
71

# Hostnames we allow this site to be served under
ALLOWED_HOSTS = ['{{ archweb_domain }}']
72

73
## CDN settings
74
CDN_ENABLED = False
75
76

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