commit | author | age
|
eb8c9c
|
1 |
import os |
JK |
2 |
|
|
3 |
# Debug settings should default to False in production Environments |
|
4 |
#DEBUG = False |
|
5 |
#TEMPLATE_DEBUG = DEBUG |
|
6 |
|
|
7 |
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) |
|
8 |
|
|
9 |
# Set custom secret key: |
|
10 |
# You can either set it to a specific value or you can let horizion generate a |
|
11 |
# default secret key that is unique on this machine, e.i. regardless of the |
|
12 |
# amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there |
|
13 |
# may be situations where you would want to set this explicitly, e.g. when |
|
14 |
# multiple dashboard instances are distributed on different machines (usually |
|
15 |
# behind a load-balancer). Either you have to make sure that a session gets all |
|
16 |
# requests routed to the same dashboard instance or you set the same SECRET_KEY |
|
17 |
# for all of them. |
|
18 |
#from webvirtmgr.utils import secret_key |
|
19 |
#SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store')) |
|
20 |
|
|
21 |
ADMINS = ( |
|
22 |
# ('Your Name', 'your_email@example.com'), |
|
23 |
) |
|
24 |
|
|
25 |
MANAGERS = ADMINS |
|
26 |
|
|
27 |
# Uncomment the relevant entries for ldap authentication |
|
28 |
# import ldap |
|
29 |
# from django_auth_ldap.config import LDAPSearch,GroupOfUniqueNamesType |
|
30 |
|
|
31 |
#AUTHENTICATION_BACKENDS = ( |
|
32 |
# 'django_auth_ldap.backend.LDAPBackend', |
|
33 |
# 'django.contrib.auth.backends.ModelBackend', |
|
34 |
#) |
|
35 |
|
|
36 |
# If the system is unable to verify the directory cert then change these settings |
|
37 |
#AUTH_LDAP_GLOBAL_OPTIONS = { |
|
38 |
# ldap.OPT_X_TLS_REQUIRE_CERT: True, |
|
39 |
# ldap.OPT_X_TLS_DEMAND: True, |
|
40 |
# ldap.OPT_REFERRALS: False, |
|
41 |
# ldap.OPT_X_TLS_CACERTDIR: "/etc/pki/tls/certs/", |
|
42 |
#} |
|
43 |
|
|
44 |
#AUTH_LDAP_SERVER_URI = "ldaps://ldapserverhostname.example.com" |
|
45 |
#AUTH_LDAP_BIND_DN = "uid=binduser,ou=systemusers,dc=example,dc=com" |
|
46 |
#AUTH_LDAP_BIND_PASSWORD = "<ldapbindpassword>" |
|
47 |
#AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com", |
|
48 |
# ldap.SCOPE_SUBTREE, "(uid=%(user)s)") |
|
49 |
#AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=groups,dc=example,dc=com", |
|
50 |
# ldap.SCOPE_SUBTREE, "(objectClass=groupOfUniqueNames)" |
|
51 |
#) |
|
52 |
#AUTH_LDAP_GROUP_TYPE = GroupOfUniqueNamesType() |
|
53 |
# |
|
54 |
#AUTH_LDAP_USER_FLAGS_BY_GROUP = { |
|
55 |
# "is_active": ["cn=grouptopermit1,ou=groups,dc=example,dc=com", "cn=grouptopermit2,ou=groups,dc=example,dc=com"], |
|
56 |
# "is_staff": "cn=grouptopermit2,ou=groups,dc=example,dc=com", |
|
57 |
# "is_superuser": "cn=grouptopermit2,ou=groups,dc=example,dc=com" |
|
58 |
#} |
|
59 |
|
|
60 |
DATABASES = { |
|
61 |
'default': { |
|
62 |
'ENGINE': 'django.db.backends.sqlite3', |
|
63 |
'NAME': os.path.join(LOCAL_PATH, 'webvirtmgr.sqlite3'), |
|
64 |
# The following settings are not used with sqlite3: |
|
65 |
'USER': '', |
|
66 |
'PASSWORD': '', |
|
67 |
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. |
|
68 |
'PORT': '', # Set to empty string for default. |
|
69 |
} |
|
70 |
} |
|
71 |
|
|
72 |
TIME_JS_REFRESH = 2000 |
|
73 |
|
|
74 |
# Hosts/domain names that are valid for this site; required if DEBUG is False |
|
75 |
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts |
|
76 |
#ALLOWED_HOSTS = ['*'] |
|
77 |
|
|
78 |
# Local time zone for this installation. Choices can be found here: |
|
79 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
80 |
# although not all choices may be available on all operating systems. |
|
81 |
# In a Windows environment this must be set to your system time zone. |
|
82 |
TIME_ZONE = 'UTC' |
|
83 |
|
|
84 |
# Language code for this installation. All choices can be found here: |
|
85 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
|
86 |
LANGUAGE_CODE = 'en-us' |
|
87 |
|
|
88 |
# Keepalive interval and count for libvirt connections |
|
89 |
# |
|
90 |
# from: http://libvirt.org/html/libvirt-libvirt.html#virConnectSetKeepAlive |
|
91 |
# |
|
92 |
# Start sending keepalive messages after @interval seconds of inactivity and |
|
93 |
# consider the connection to be broken when no response is received after |
|
94 |
# @count keepalive messages sent in a row. In other words, sending count + 1 |
|
95 |
# keepalive message results in closing the connection. When @interval is <= 0, |
|
96 |
# no keepalive messages will be sent. When @count is 0, the connection will be |
|
97 |
# automatically closed after @interval seconds of inactivity without sending |
|
98 |
# any keepalive messages. |
|
99 |
# |
|
100 |
# Keep in mind that by default (at least on ubuntu variants) the libvirt.d is |
|
101 |
# configured to send keepalive messages by default (interval: 5, count: 5). |
|
102 |
# If the libvirt.d keeps on sending keepalive messages form the server-side |
|
103 |
# we will never close the connection no matter what these parameters are set |
|
104 |
# to, as long as the libvirt.d is up and running at the server side. |
|
105 |
LIBVIRT_KEEPALIVE_INTERVAL = 5 |
|
106 |
LIBVIRT_KEEPALIVE_COUNT = 5 |