root / settings.py.dist @ 8914c9d9
History | View | Annotate | Download (7.7 kB)
1 | 8914c9d9 | Leonidas Poulopoulos | # Django settings for flowspy project. |
---|---|---|---|
2 | 9f54980a | Leonidas Poulopoulos | # -*- coding: utf-8 -*- vim:fileencoding=utf-8: |
3 | 8914c9d9 | Leonidas Poulopoulos | # vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab |
4 | 9f54980a | Leonidas Poulopoulos | #Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) |
5 | 9f54980a | Leonidas Poulopoulos | |
6 | 9f54980a | Leonidas Poulopoulos | #Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), |
7 | 9f54980a | Leonidas Poulopoulos | #GRNET NOC |
8 | 9f54980a | Leonidas Poulopoulos | # |
9 | 9f54980a | Leonidas Poulopoulos | #Permission to use, copy, modify, and/or distribute this software for any |
10 | 9f54980a | Leonidas Poulopoulos | #purpose with or without fee is hereby granted, provided that the above |
11 | 9f54980a | Leonidas Poulopoulos | #copyright notice and this permission notice appear in all copies. |
12 | 9f54980a | Leonidas Poulopoulos | # |
13 | 9f54980a | Leonidas Poulopoulos | #THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD |
14 | 9f54980a | Leonidas Poulopoulos | #TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
15 | 9f54980a | Leonidas Poulopoulos | #FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR |
16 | 9f54980a | Leonidas Poulopoulos | #CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
17 | 9f54980a | Leonidas Poulopoulos | #DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS |
18 | 9f54980a | Leonidas Poulopoulos | #ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
19 | 9f54980a | Leonidas Poulopoulos | #SOFTWARE. |
20 | 9f54980a | Leonidas Poulopoulos | # |
21 | 8914c9d9 | Leonidas Poulopoulos | |
22 | 8914c9d9 | Leonidas Poulopoulos | |
23 | b4401a0c | Leonidas Poulopoulos | import os |
24 | b4401a0c | Leonidas Poulopoulos | import djcelery |
25 | b4401a0c | Leonidas Poulopoulos | djcelery.setup_loader() |
26 | b4401a0c | Leonidas Poulopoulos | from celery.schedules import crontab |
27 | 43e360e3 | Leonidas Poulopoulos | DEBUG = False |
28 | a3af8464 | Leonidas Poulopoulos | TEMPLATE_DEBUG = DEBUG |
29 | a3af8464 | Leonidas Poulopoulos | |
30 | a3af8464 | Leonidas Poulopoulos | ADMINS = ( |
31 | 424e79da | Leonidas Poulopoulos | ('AdminName', 'adminmail@admin.com'), |
32 | a3af8464 | Leonidas Poulopoulos | ) |
33 | a3af8464 | Leonidas Poulopoulos | |
34 | b4401a0c | Leonidas Poulopoulos | here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x) |
35 | b4401a0c | Leonidas Poulopoulos | |
36 | 049a5a10 | Leonidas Poulopoulos | |
37 | 049a5a10 | Leonidas Poulopoulos | |
38 | a3af8464 | Leonidas Poulopoulos | MANAGERS = ADMINS |
39 | a3af8464 | Leonidas Poulopoulos | |
40 | a3af8464 | Leonidas Poulopoulos | DATABASES = { |
41 | a3af8464 | Leonidas Poulopoulos | 'default': { |
42 | 43e360e3 | Leonidas Poulopoulos | 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
43 | 43e360e3 | Leonidas Poulopoulos | 'NAME': 'flowspec', # Or path to database file if using sqlite3. |
44 | a3af8464 | Leonidas Poulopoulos | 'USER': '', # Not used with sqlite3. |
45 | a3af8464 | Leonidas Poulopoulos | 'PASSWORD': '', # Not used with sqlite3. |
46 | a3af8464 | Leonidas Poulopoulos | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
47 | a3af8464 | Leonidas Poulopoulos | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
48 | 049a5a10 | Leonidas Poulopoulos | 'OPTIONS': { |
49 | b63e673d | Leonidas Poulopoulos | "init_command": "SET storage_engine=MYISAM", |
50 | 424e79da | Leonidas Poulopoulos | } |
51 | a3af8464 | Leonidas Poulopoulos | } |
52 | a3af8464 | Leonidas Poulopoulos | } |
53 | a3af8464 | Leonidas Poulopoulos | |
54 | a3af8464 | Leonidas Poulopoulos | # Local time zone for this installation. Choices can be found here: |
55 | a3af8464 | Leonidas Poulopoulos | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
56 | a3af8464 | Leonidas Poulopoulos | # although not all choices may be available on all operating systems. |
57 | a3af8464 | Leonidas Poulopoulos | # On Unix systems, a value of None will cause Django to use the same |
58 | a3af8464 | Leonidas Poulopoulos | # timezone as the operating system. |
59 | a3af8464 | Leonidas Poulopoulos | # If running in a Windows environment this must be set to the same as your |
60 | a3af8464 | Leonidas Poulopoulos | # system time zone. |
61 | 049a5a10 | Leonidas Poulopoulos | TIME_ZONE = 'Europe/Athens' |
62 | 049a5a10 | Leonidas Poulopoulos | |
63 | 049a5a10 | Leonidas Poulopoulos | # Language code for this installation. All choices can be found here: |
64 | 049a5a10 | Leonidas Poulopoulos | # http://www.i18nguy.com/unicode/language-identifiers.html |
65 | 049a5a10 | Leonidas Poulopoulos | _ = lambda s: s |
66 | 049a5a10 | Leonidas Poulopoulos | |
67 | 049a5a10 | Leonidas Poulopoulos | LANGUAGES = ( |
68 | 049a5a10 | Leonidas Poulopoulos | ('el', _('Greek')), |
69 | 049a5a10 | Leonidas Poulopoulos | ('en', _('English')), |
70 | 049a5a10 | Leonidas Poulopoulos | ) |
71 | a3af8464 | Leonidas Poulopoulos | |
72 | a3af8464 | Leonidas Poulopoulos | # Language code for this installation. All choices can be found here: |
73 | a3af8464 | Leonidas Poulopoulos | # http://www.i18nguy.com/unicode/language-identifiers.html |
74 | 4d02b9bc | Leonidas Poulopoulos | LANGUAGE_CODE = 'en' |
75 | a3af8464 | Leonidas Poulopoulos | |
76 | a3af8464 | Leonidas Poulopoulos | SITE_ID = 1 |
77 | a3af8464 | Leonidas Poulopoulos | |
78 | a3af8464 | Leonidas Poulopoulos | # If you set this to False, Django will make some optimizations so as not |
79 | a3af8464 | Leonidas Poulopoulos | # to load the internationalization machinery. |
80 | a3af8464 | Leonidas Poulopoulos | USE_I18N = True |
81 | a3af8464 | Leonidas Poulopoulos | |
82 | a3af8464 | Leonidas Poulopoulos | # If you set this to False, Django will not format dates, numbers and |
83 | a3af8464 | Leonidas Poulopoulos | # calendars according to the current locale |
84 | a3af8464 | Leonidas Poulopoulos | USE_L10N = True |
85 | a3af8464 | Leonidas Poulopoulos | |
86 | a3af8464 | Leonidas Poulopoulos | # Absolute path to the directory that holds media. |
87 | a3af8464 | Leonidas Poulopoulos | # Example: "/home/media/media.lawrence.com/" |
88 | a3af8464 | Leonidas Poulopoulos | MEDIA_ROOT = '' |
89 | a3af8464 | Leonidas Poulopoulos | |
90 | a3af8464 | Leonidas Poulopoulos | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
91 | a3af8464 | Leonidas Poulopoulos | # trailing slash if there is a path component (optional in other cases). |
92 | a3af8464 | Leonidas Poulopoulos | # Examples: "http://media.lawrence.com", "http://example.com/media/" |
93 | a3af8464 | Leonidas Poulopoulos | MEDIA_URL = '' |
94 | a3af8464 | Leonidas Poulopoulos | |
95 | a3af8464 | Leonidas Poulopoulos | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
96 | a3af8464 | Leonidas Poulopoulos | # trailing slash. |
97 | a3af8464 | Leonidas Poulopoulos | # Examples: "http://foo.com/media/", "/media/". |
98 | 049a5a10 | Leonidas Poulopoulos | ADMIN_MEDIA_PREFIX = '/admin/media/' |
99 | a3af8464 | Leonidas Poulopoulos | |
100 | a3af8464 | Leonidas Poulopoulos | # Make this unique, and don't share it with anybody. |
101 | a3af8464 | Leonidas Poulopoulos | SECRET_KEY = 'fju0e4zu-thi7qf@93voi5eeot21@a*e54)%89xe-7iorqcimk' |
102 | a3af8464 | Leonidas Poulopoulos | |
103 | a3af8464 | Leonidas Poulopoulos | # List of callables that know how to import templates from various sources. |
104 | a3af8464 | Leonidas Poulopoulos | TEMPLATE_LOADERS = ( |
105 | a3af8464 | Leonidas Poulopoulos | 'django.template.loaders.filesystem.Loader', |
106 | a3af8464 | Leonidas Poulopoulos | 'django.template.loaders.app_directories.Loader', |
107 | a3af8464 | Leonidas Poulopoulos | # 'django.template.loaders.eggs.Loader', |
108 | a3af8464 | Leonidas Poulopoulos | ) |
109 | a3af8464 | Leonidas Poulopoulos | |
110 | 049a5a10 | Leonidas Poulopoulos | TEMPLATE_CONTEXT_PROCESSORS = ( |
111 | 049a5a10 | Leonidas Poulopoulos | "django.contrib.auth.context_processors.auth", |
112 | 049a5a10 | Leonidas Poulopoulos | "django.core.context_processors.debug", |
113 | 049a5a10 | Leonidas Poulopoulos | "django.core.context_processors.i18n", |
114 | 049a5a10 | Leonidas Poulopoulos | "django.core.context_processors.media", |
115 | 049a5a10 | Leonidas Poulopoulos | "django.contrib.messages.context_processors.messages" |
116 | 049a5a10 | Leonidas Poulopoulos | ) |
117 | 049a5a10 | Leonidas Poulopoulos | |
118 | a3af8464 | Leonidas Poulopoulos | MIDDLEWARE_CLASSES = ( |
119 | 049a5a10 | Leonidas Poulopoulos | 'django.middleware.cache.UpdateCacheMiddleware', |
120 | a3af8464 | Leonidas Poulopoulos | 'django.middleware.common.CommonMiddleware', |
121 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.sessions.middleware.SessionMiddleware', |
122 | a9afab21 | Leonidas Poulopoulos | 'django.middleware.locale.LocaleMiddleware', |
123 | a3af8464 | Leonidas Poulopoulos | 'django.middleware.csrf.CsrfViewMiddleware', |
124 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
125 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.messages.middleware.MessageMiddleware', |
126 | 049a5a10 | Leonidas Poulopoulos | 'django.middleware.cache.FetchFromCacheMiddleware', |
127 | 4d02b9bc | Leonidas Poulopoulos | 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', |
128 | 049a5a10 | Leonidas Poulopoulos | ) |
129 | 049a5a10 | Leonidas Poulopoulos | |
130 | 049a5a10 | Leonidas Poulopoulos | AUTHENTICATION_BACKENDS = ( |
131 | 049a5a10 | Leonidas Poulopoulos | 'flowspy.djangobackends.shibauthBackend.shibauthBackend', |
132 | 049a5a10 | Leonidas Poulopoulos | 'django.contrib.auth.backends.ModelBackend', |
133 | a3af8464 | Leonidas Poulopoulos | ) |
134 | a3af8464 | Leonidas Poulopoulos | |
135 | a3af8464 | Leonidas Poulopoulos | ROOT_URLCONF = 'flowspy.urls' |
136 | a3af8464 | Leonidas Poulopoulos | |
137 | 43e360e3 | Leonidas Poulopoulos | STATIC_URL = '/path/to/static' |
138 | 049a5a10 | Leonidas Poulopoulos | |
139 | a3af8464 | Leonidas Poulopoulos | TEMPLATE_DIRS = ( |
140 | 43e360e3 | Leonidas Poulopoulos | '/path/to/templates/', |
141 | a3af8464 | Leonidas Poulopoulos | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
142 | a3af8464 | Leonidas Poulopoulos | # Always use forward slashes, even on Windows. |
143 | a3af8464 | Leonidas Poulopoulos | # Don't forget to use absolute paths, not relative paths. |
144 | a3af8464 | Leonidas Poulopoulos | ) |
145 | a3af8464 | Leonidas Poulopoulos | |
146 | a3af8464 | Leonidas Poulopoulos | INSTALLED_APPS = ( |
147 | 049a5a10 | Leonidas Poulopoulos | 'monkey_patch', |
148 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.auth', |
149 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.contenttypes', |
150 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.sessions', |
151 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.sites', |
152 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.messages', |
153 | 4d02b9bc | Leonidas Poulopoulos | 'django.contrib.flatpages', |
154 | a3af8464 | Leonidas Poulopoulos | 'flowspec', |
155 | 049a5a10 | Leonidas Poulopoulos | 'poller', |
156 | 94fa54a3 | Leonidas Poulopoulos | 'south', |
157 | a3af8464 | Leonidas Poulopoulos | # Uncomment the next line to enable the admin: |
158 | 049a5a10 | Leonidas Poulopoulos | 'django.contrib.admin', |
159 | a3af8464 | Leonidas Poulopoulos | # Uncomment the next line to enable admin documentation: |
160 | 049a5a10 | Leonidas Poulopoulos | 'django.contrib.admindocs', |
161 | 049a5a10 | Leonidas Poulopoulos | 'django_extensions', |
162 | 049a5a10 | Leonidas Poulopoulos | 'djcelery', |
163 | 049a5a10 | Leonidas Poulopoulos | 'peers', |
164 | ba7099ee | Leonidas Poulopoulos | 'registration', |
165 | 6ecbf4ec | Leonidas Poulopoulos | 'accounts', |
166 | 6ecbf4ec | Leonidas Poulopoulos | 'tinymce', |
167 | a3af8464 | Leonidas Poulopoulos | ) |
168 | 049a5a10 | Leonidas Poulopoulos | |
169 | 049a5a10 | Leonidas Poulopoulos | LOGIN_URL = '/fod/welcome' |
170 | 049a5a10 | Leonidas Poulopoulos | |
171 | b4401a0c | Leonidas Poulopoulos | CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=3600" |
172 | 049a5a10 | Leonidas Poulopoulos | |
173 | 049a5a10 | Leonidas Poulopoulos | AUTH_PROFILE_MODULE = 'accounts.UserProfile' |
174 | 049a5a10 | Leonidas Poulopoulos | |
175 | 049a5a10 | Leonidas Poulopoulos | NETCONF_DEVICE = "" |
176 | 049a5a10 | Leonidas Poulopoulos | NETCONF_USER = "" |
177 | 049a5a10 | Leonidas Poulopoulos | NETCONF_PASS = "" |
178 | 049a5a10 | Leonidas Poulopoulos | ROUTES_FILTER = "<configuration><routing-options><flow/></routing-options></configuration>" |
179 | 049a5a10 | Leonidas Poulopoulos | ROUTE_FILTER = "<configuration><routing-options><flow><route><name>%s</name></route></flow></routing-options></configuration>" |
180 | 049a5a10 | Leonidas Poulopoulos | COMMIT_CONFIRMED_TIMEOUT = "120" |
181 | 049a5a10 | Leonidas Poulopoulos | EXPIRATION_DAYS_OFFSET = 7 |
182 | 049a5a10 | Leonidas Poulopoulos | COMMIT = True |
183 | 049a5a10 | Leonidas Poulopoulos | |
184 | 049a5a10 | Leonidas Poulopoulos | USE_X_FORWARDED_HOST = True |
185 | 049a5a10 | Leonidas Poulopoulos | |
186 | 049a5a10 | Leonidas Poulopoulos | BROKER_HOST = "localhost" |
187 | 049a5a10 | Leonidas Poulopoulos | BROKER_PORT = 11300 |
188 | 049a5a10 | Leonidas Poulopoulos | POLLS_TUBE = 'polls' |
189 | 424e79da | Leonidas Poulopoulos | |
190 | 049a5a10 | Leonidas Poulopoulos | BROKER_VHOST = "/" |
191 | 049a5a10 | Leonidas Poulopoulos | CELERY_CONCURRENCY = 1 |
192 | 049a5a10 | Leonidas Poulopoulos | |
193 | 049a5a10 | Leonidas Poulopoulos | # List of modules to import when celery starts. |
194 | 049a5a10 | Leonidas Poulopoulos | CELERY_IMPORTS = ("flowspec.tasks", ) |
195 | 049a5a10 | Leonidas Poulopoulos | |
196 | fcaef996 | Leonidas Poulopoulos | SERVER_EMAIL = "GRNET FoD Service <noreply@grnet.gr>" |
197 | b4401a0c | Leonidas Poulopoulos | EMAIL_SUBJECT_PREFIX = "[FoD] " |
198 | b4401a0c | Leonidas Poulopoulos | |
199 | b4401a0c | Leonidas Poulopoulos | LOG_FILE_LOCATION = here("log") |
200 | b4401a0c | Leonidas Poulopoulos | |
201 | b4401a0c | Leonidas Poulopoulos | EXPIRATION_NOTIFY_DAYS = 4 |
202 | 424e79da | Leonidas Poulopoulos | PREFIX_LENGTH = 29 |
203 | b4401a0c | Leonidas Poulopoulos | POLL_SESSION_UPDATE = 60.0 |
204 | 049a5a10 | Leonidas Poulopoulos | |
205 | 049a5a10 | Leonidas Poulopoulos | BROKER_URL = "beanstalk://localhost:11300//" |
206 | 049a5a10 | Leonidas Poulopoulos | |
207 | 398213bb | Leonidas Poulopoulos | SHIB_AUTH_ENTITLEMENT = 'urn:mace' |
208 | 735ba631 | Leonidas Poulopoulos | SHIB_ADMIN_DOMAIN = 'grnet.gr' |
209 | 627e731e | Leonidas Poulopoulos | SHIB_LOGOUT_URL = 'https://example.com/Shibboleth.sso/Logout' |
210 | 735ba631 | Leonidas Poulopoulos | |
211 | 43e360e3 | Leonidas Poulopoulos | # BCC mail addresses |
212 | 43e360e3 | Leonidas Poulopoulos | NOTIFY_ADMIN_MAILS = ["admin@admin.com"] |
213 | 424e79da | Leonidas Poulopoulos | |
214 | 424e79da | Leonidas Poulopoulos | UI_USER_THEN_ACTIONS = ['discard', 'rate-limit'] |
215 | 94fa54a3 | Leonidas Poulopoulos | UI_USER_PROTOCOLS = ['icmp', 'tcp', 'udp'] |
216 | 424e79da | Leonidas Poulopoulos | |
217 | 424e79da | Leonidas Poulopoulos | PROTECTED_SUBNETS = ['10.10.0.0/16'] |
218 | 424e79da | Leonidas Poulopoulos | |
219 | 15d4014d | Leonidas Poulopoulos | CELERYBEAT_SCHEDULE = { |
220 | 735ba631 | Leonidas Poulopoulos | "every-day-sync": { |
221 | 735ba631 | Leonidas Poulopoulos | "task": "flowspec.tasks.check_sync", |
222 | b4401a0c | Leonidas Poulopoulos | "schedule": crontab(minute=01, hour=01), |
223 | 735ba631 | Leonidas Poulopoulos | "args": (), |
224 | 735ba631 | Leonidas Poulopoulos | }, |
225 | 15d4014d | Leonidas Poulopoulos | "notify-expired": { |
226 | 15d4014d | Leonidas Poulopoulos | "task": "flowspec.tasks.notify_expired", |
227 | 15d4014d | Leonidas Poulopoulos | "schedule": crontab(minute=01, hour=02), |
228 | 15d4014d | Leonidas Poulopoulos | "args": (), |
229 | 15d4014d | Leonidas Poulopoulos | }, |
230 | 43e360e3 | Leonidas Poulopoulos | } |
231 | 1534e9c2 | Leonidas Poulopoulos | # whois |
232 | 1534e9c2 | Leonidas Poulopoulos | PRIMARY_WHOIS = 'whois.grnet.gr' |
233 | 1534e9c2 | Leonidas Poulopoulos | ALTERNATE_WHOIS = 'whois.ripe.net' |
234 | 43e360e3 | Leonidas Poulopoulos | |
235 | 7dc5bd0c | Leonidas Poulopoulos | ACCOUNT_ACTIVATION_DAYS = 7 |
236 | 7dc5bd0c | Leonidas Poulopoulos | |
237 | 7dc5bd0c | Leonidas Poulopoulos | #Shibboleth attribute map |
238 | 7dc5bd0c | Leonidas Poulopoulos | SHIB_USERNAME = ['HTTP_EPPN'] |
239 | 7dc5bd0c | Leonidas Poulopoulos | SHIB_MAIL = ['mail', 'HTTP_MAIL', 'HTTP_SHIB_INETORGPERSON_MAIL'] |
240 | 7dc5bd0c | Leonidas Poulopoulos | SHIB_FIRSTNAME = ['HTTP_SHIB_INETORGPERSON_GIVENNAME'] |
241 | 7dc5bd0c | Leonidas Poulopoulos | SHIB_LASTNAME = ['HTTP_SHIB_PERSON_SURNAME'] |
242 | 7dc5bd0c | Leonidas Poulopoulos | SHIB_ENTITLEMENT = ['HTTP_SHIB_EP_ENTITLEMENT'] |
243 | 7dc5bd0c | Leonidas Poulopoulos | |
244 | 72f63330 | Leonidas Poulopoulos | TINYMCE_JS_URL = '/fodstatic/js/tinymce/tiny_mce.js' |
245 | 6ecbf4ec | Leonidas Poulopoulos | |
246 | 6ecbf4ec | Leonidas Poulopoulos | TINYMCE_DEFAULT_CONFIG = { |
247 | 6ecbf4ec | Leonidas Poulopoulos | 'extended_valid_elements' : 'iframe[src|width|height|name|align]', |
248 | 6ecbf4ec | Leonidas Poulopoulos | 'plugins': "table,spellchecker,paste,searchreplace", |
249 | 6ecbf4ec | Leonidas Poulopoulos | 'theme': "advanced", |
250 | 6ecbf4ec | Leonidas Poulopoulos | } |
251 | 6ecbf4ec | Leonidas Poulopoulos |