This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.py.erb
127 lines (97 loc) · 3.71 KB
/
settings.py.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<% app_node=node[:viewshare] %>
import os
DEBUG = <%= @debug ? "True" : "False" %>
DATABASES = {
'default': {
'NAME': '<%= @database[:settings][:database] %>',
'ENGINE': 'django.db.backends.<%= @database[:settings][:adapter] %>',
'USER': '<%= @database[:settings][:username] %>',
'PASSWORD': '<%= @database[:settings][:password] %>',
'HOST': '<%= @database[:settings][:host] %>',
'PORT': '<%= @database[:settings][:port] %>',
},
}
SITE_NAME="Viewshare"
SITE_NAME_STATUS = ""
MEDIA_ROOT = "<%= @root_path %>/shared/media/"
STATIC_ROOT = "<%= @root_path %>/shared/static/"
FILE_UPLOAD_PATH = "<%= @root_path %>/shared/upload"
FILE_DOWNLOAD_NGINX_OPTIMIZATION=True
COMPRESS_ROOT=STATIC_ROOT
AKARA_URL_PREFIX='<%= app_node['akara_url'] %>'
LOCAL_INSTALLED_APPS=("gunicorn",)
SECRET_KEY = "<%= app_node[:secret_key] %>"
COMPRESS_ROOT = STATIC_ROOT
COMPRESS_CSS_FILTERS=('compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.CSSMinFilter')
COMPRESS_ENABLED=<%= @debug ? "False" : "True" %>
COMPRESS_OFFLINE=<%= @debug ? "True" : "False" %>
COMPRESS_STORAGE='compressor.storage.GzipCompressorFileStorage'
<% if @email_settings %>
EMAIL_CONFIRMATION_DAYS = 2
EMAIL_DEBUG = DEBUG
EMAIL_HOST = "<%= @email_settings["host"] %>"
EMAIL_PORT = <%= @email_settings["port"] %>
EMAIL_HOST_USER = "<%= @email_settings["host_user"] %>"
EMAIL_HOST_PASSWORD = "<%= @email_settings["host_password"] %>"
EMAIL_USE_TLS= <%= @email_settings["use_tls"] ? "True" : "False" %>
<% end %>
<% if not @debug -%>
TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)),
)
<% end -%>
LOCAL_PRE_MIDDLEWARE_CLASSES = (
'django.middleware.gzip.GZipMiddleware',
)
<% if node[:memcached] -%>
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '<%= node[:memcached][:listen] == "0.0.0.0"? "127.0.0.1" : node[:memcached][:listen] %>:<%= node[:memcached][:port] %>',
}
}
SESSION_ENGINE="django.contrib.sessions.backends.cached_db"
<% end -%>
<%if app_node[:sentry] -%>
LOCAL_INSTALLED_APPS += ("sentry.client",)
SENTRY_REMOTE_URL = '<%= app_node[:sentry][:url] %>'
SENTRY_KEY = '<%= app_node[:sentry][:key] %>'
<%end%>
<% if app_node[:redmine] -%>
<% redmine = app_node[:redmine] %>
REDMINE_URL = '<%= redmine["url"] %>'
REDMINE_USER = '<%= redmine["user"] %>'
REDMINE_USER_ID = '<%= redmine["user_id"] %>'
REDMINE_PASSWORD = '<%= redmine["password"] %>'
REDMINE_KEY = '<%= redmine["key"] %>'
REDMINE_PROJECT_ID = '<%= redmine["project_id"] %>'
SUPPORT_USER = '<%= redmine["support_user"] %>'
<% end -%>
<% if app_node[:uservoice] -%>
<% uservoice = app_node[:uservoice] %>
USERVOICE_SETTINGS = {
'API_KEY': "<%= uservoice["api_key"] %>",
'ACCOUNT_KEY':"<%= uservoice["account_key"] %>",
'HOST': "<%= uservoice["host"] %>",
'FORUM': "<%= uservoice["forum"] %>",
'SSO_KEY': "<%= uservoice["sso_key"] %>",
'support_queues': {
'ignored_fields': "Ignored Data",
'augmentation': "Augmentation",
'upload': "Data Load"
}
}
SUPPORT_BACKEND = "viewshare.apps.support.backends.uservoice.UservoiceSupportBackend"
SUPPORT_USER = '<%= uservoice["support_user"] %>'
<% end -%>
SITE_ID = '<%= app_node['site_id'] %>'
SITE_NAME= '<%= app_node['site_name'] %>'
SITE_NAME_STATUS = '<%= app_node['site_status'] %>'
CONTACT_EMAIL = "<%= app_node["contact_email"] %>"
USER_APPROVAL_EMAIL_LIST=("<%= app_node["user_approval_email"] %>",)
DEFAULT_FROM_EMAIL = "<%= app_node["from_email"] %>"
USER_REGISTRATION_FROM_EMAIL = "<%= app_node["user_registration_from_email"] %>"
CELERY_ALWAYS_EAGER = False