root / settings.py.dist @ 4d02b9bc
History | View | Annotate | Download (6.4 kB)
1 | 4d02b9bc | Leonidas Poulopoulos | # Django settings for grnet project. |
---|---|---|---|
2 | 4d02b9bc | Leonidas Poulopoulos | # -*- coding: utf-8 -*- vim:encoding=utf-8: |
3 | 4d02b9bc | Leonidas Poulopoulos | # vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab |
4 | b4401a0c | Leonidas Poulopoulos | import os |
5 | b4401a0c | Leonidas Poulopoulos | import djcelery |
6 | b4401a0c | Leonidas Poulopoulos | djcelery.setup_loader() |
7 | b4401a0c | Leonidas Poulopoulos | from celery.schedules import crontab |
8 | 43e360e3 | Leonidas Poulopoulos | DEBUG = False |
9 | a3af8464 | Leonidas Poulopoulos | TEMPLATE_DEBUG = DEBUG |
10 | a3af8464 | Leonidas Poulopoulos | |
11 | a3af8464 | Leonidas Poulopoulos | ADMINS = ( |
12 | 424e79da | Leonidas Poulopoulos | ('AdminName', 'adminmail@admin.com'), |
13 | a3af8464 | Leonidas Poulopoulos | ) |
14 | a3af8464 | Leonidas Poulopoulos | |
15 | b4401a0c | Leonidas Poulopoulos | here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x) |
16 | b4401a0c | Leonidas Poulopoulos | |
17 | 049a5a10 | Leonidas Poulopoulos | |
18 | 049a5a10 | Leonidas Poulopoulos | |
19 | a3af8464 | Leonidas Poulopoulos | MANAGERS = ADMINS |
20 | a3af8464 | Leonidas Poulopoulos | |
21 | a3af8464 | Leonidas Poulopoulos | DATABASES = { |
22 | a3af8464 | Leonidas Poulopoulos | 'default': { |
23 | 43e360e3 | Leonidas Poulopoulos | 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
24 | 43e360e3 | Leonidas Poulopoulos | 'NAME': 'flowspec', # Or path to database file if using sqlite3. |
25 | a3af8464 | Leonidas Poulopoulos | 'USER': '', # Not used with sqlite3. |
26 | a3af8464 | Leonidas Poulopoulos | 'PASSWORD': '', # Not used with sqlite3. |
27 | a3af8464 | Leonidas Poulopoulos | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
28 | a3af8464 | Leonidas Poulopoulos | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
29 | 049a5a10 | Leonidas Poulopoulos | 'OPTIONS': { |
30 | b63e673d | Leonidas Poulopoulos | "init_command": "SET storage_engine=MYISAM", |
31 | 424e79da | Leonidas Poulopoulos | } |
32 | a3af8464 | Leonidas Poulopoulos | } |
33 | a3af8464 | Leonidas Poulopoulos | } |
34 | a3af8464 | Leonidas Poulopoulos | |
35 | a3af8464 | Leonidas Poulopoulos | # Local time zone for this installation. Choices can be found here: |
36 | a3af8464 | Leonidas Poulopoulos | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
37 | a3af8464 | Leonidas Poulopoulos | # although not all choices may be available on all operating systems. |
38 | a3af8464 | Leonidas Poulopoulos | # On Unix systems, a value of None will cause Django to use the same |
39 | a3af8464 | Leonidas Poulopoulos | # timezone as the operating system. |
40 | a3af8464 | Leonidas Poulopoulos | # If running in a Windows environment this must be set to the same as your |
41 | a3af8464 | Leonidas Poulopoulos | # system time zone. |
42 | 049a5a10 | Leonidas Poulopoulos | TIME_ZONE = 'Europe/Athens' |
43 | 049a5a10 | Leonidas Poulopoulos | |
44 | 049a5a10 | Leonidas Poulopoulos | # Language code for this installation. All choices can be found here: |
45 | 049a5a10 | Leonidas Poulopoulos | # http://www.i18nguy.com/unicode/language-identifiers.html |
46 | 049a5a10 | Leonidas Poulopoulos | _ = lambda s: s |
47 | 049a5a10 | Leonidas Poulopoulos | |
48 | 049a5a10 | Leonidas Poulopoulos | LANGUAGES = ( |
49 | 049a5a10 | Leonidas Poulopoulos | ('el', _('Greek')), |
50 | 049a5a10 | Leonidas Poulopoulos | ('en', _('English')), |
51 | 049a5a10 | Leonidas Poulopoulos | ) |
52 | a3af8464 | Leonidas Poulopoulos | |
53 | a3af8464 | Leonidas Poulopoulos | # Language code for this installation. All choices can be found here: |
54 | a3af8464 | Leonidas Poulopoulos | # http://www.i18nguy.com/unicode/language-identifiers.html |
55 | 4d02b9bc | Leonidas Poulopoulos | LANGUAGE_CODE = 'en' |
56 | a3af8464 | Leonidas Poulopoulos | |
57 | a3af8464 | Leonidas Poulopoulos | SITE_ID = 1 |
58 | a3af8464 | Leonidas Poulopoulos | |
59 | a3af8464 | Leonidas Poulopoulos | # If you set this to False, Django will make some optimizations so as not |
60 | a3af8464 | Leonidas Poulopoulos | # to load the internationalization machinery. |
61 | a3af8464 | Leonidas Poulopoulos | USE_I18N = True |
62 | a3af8464 | Leonidas Poulopoulos | |
63 | a3af8464 | Leonidas Poulopoulos | # If you set this to False, Django will not format dates, numbers and |
64 | a3af8464 | Leonidas Poulopoulos | # calendars according to the current locale |
65 | a3af8464 | Leonidas Poulopoulos | USE_L10N = True |
66 | a3af8464 | Leonidas Poulopoulos | |
67 | a3af8464 | Leonidas Poulopoulos | # Absolute path to the directory that holds media. |
68 | a3af8464 | Leonidas Poulopoulos | # Example: "/home/media/media.lawrence.com/" |
69 | a3af8464 | Leonidas Poulopoulos | MEDIA_ROOT = '' |
70 | a3af8464 | Leonidas Poulopoulos | |
71 | a3af8464 | Leonidas Poulopoulos | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
72 | a3af8464 | Leonidas Poulopoulos | # trailing slash if there is a path component (optional in other cases). |
73 | a3af8464 | Leonidas Poulopoulos | # Examples: "http://media.lawrence.com", "http://example.com/media/" |
74 | a3af8464 | Leonidas Poulopoulos | MEDIA_URL = '' |
75 | a3af8464 | Leonidas Poulopoulos | |
76 | a3af8464 | Leonidas Poulopoulos | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
77 | a3af8464 | Leonidas Poulopoulos | # trailing slash. |
78 | a3af8464 | Leonidas Poulopoulos | # Examples: "http://foo.com/media/", "/media/". |
79 | 049a5a10 | Leonidas Poulopoulos | ADMIN_MEDIA_PREFIX = '/admin/media/' |
80 | a3af8464 | Leonidas Poulopoulos | |
81 | a3af8464 | Leonidas Poulopoulos | # Make this unique, and don't share it with anybody. |
82 | a3af8464 | Leonidas Poulopoulos | SECRET_KEY = 'fju0e4zu-thi7qf@93voi5eeot21@a*e54)%89xe-7iorqcimk' |
83 | a3af8464 | Leonidas Poulopoulos | |
84 | a3af8464 | Leonidas Poulopoulos | # List of callables that know how to import templates from various sources. |
85 | a3af8464 | Leonidas Poulopoulos | TEMPLATE_LOADERS = ( |
86 | a3af8464 | Leonidas Poulopoulos | 'django.template.loaders.filesystem.Loader', |
87 | a3af8464 | Leonidas Poulopoulos | 'django.template.loaders.app_directories.Loader', |
88 | a3af8464 | Leonidas Poulopoulos | # 'django.template.loaders.eggs.Loader', |
89 | a3af8464 | Leonidas Poulopoulos | ) |
90 | a3af8464 | Leonidas Poulopoulos | |
91 | 049a5a10 | Leonidas Poulopoulos | TEMPLATE_CONTEXT_PROCESSORS = ( |
92 | 049a5a10 | Leonidas Poulopoulos | "django.contrib.auth.context_processors.auth", |
93 | 049a5a10 | Leonidas Poulopoulos | "django.core.context_processors.debug", |
94 | 049a5a10 | Leonidas Poulopoulos | "django.core.context_processors.i18n", |
95 | 049a5a10 | Leonidas Poulopoulos | "django.core.context_processors.media", |
96 | 049a5a10 | Leonidas Poulopoulos | "django.contrib.messages.context_processors.messages" |
97 | 049a5a10 | Leonidas Poulopoulos | ) |
98 | 049a5a10 | Leonidas Poulopoulos | |
99 | a3af8464 | Leonidas Poulopoulos | MIDDLEWARE_CLASSES = ( |
100 | 049a5a10 | Leonidas Poulopoulos | 'django.middleware.cache.UpdateCacheMiddleware', |
101 | a3af8464 | Leonidas Poulopoulos | 'django.middleware.common.CommonMiddleware', |
102 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.sessions.middleware.SessionMiddleware', |
103 | a9afab21 | Leonidas Poulopoulos | 'django.middleware.locale.LocaleMiddleware', |
104 | a3af8464 | Leonidas Poulopoulos | 'django.middleware.csrf.CsrfViewMiddleware', |
105 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
106 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.messages.middleware.MessageMiddleware', |
107 | 049a5a10 | Leonidas Poulopoulos | 'django.middleware.cache.FetchFromCacheMiddleware', |
108 | 4d02b9bc | Leonidas Poulopoulos | 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', |
109 | 049a5a10 | Leonidas Poulopoulos | ) |
110 | 049a5a10 | Leonidas Poulopoulos | |
111 | 049a5a10 | Leonidas Poulopoulos | AUTHENTICATION_BACKENDS = ( |
112 | 049a5a10 | Leonidas Poulopoulos | 'flowspy.djangobackends.shibauthBackend.shibauthBackend', |
113 | 049a5a10 | Leonidas Poulopoulos | 'django.contrib.auth.backends.ModelBackend', |
114 | a3af8464 | Leonidas Poulopoulos | ) |
115 | a3af8464 | Leonidas Poulopoulos | |
116 | a3af8464 | Leonidas Poulopoulos | ROOT_URLCONF = 'flowspy.urls' |
117 | a3af8464 | Leonidas Poulopoulos | |
118 | 43e360e3 | Leonidas Poulopoulos | STATIC_URL = '/path/to/static' |
119 | 049a5a10 | Leonidas Poulopoulos | |
120 | a3af8464 | Leonidas Poulopoulos | TEMPLATE_DIRS = ( |
121 | 43e360e3 | Leonidas Poulopoulos | '/path/to/templates/', |
122 | a3af8464 | Leonidas Poulopoulos | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
123 | a3af8464 | Leonidas Poulopoulos | # Always use forward slashes, even on Windows. |
124 | a3af8464 | Leonidas Poulopoulos | # Don't forget to use absolute paths, not relative paths. |
125 | a3af8464 | Leonidas Poulopoulos | ) |
126 | a3af8464 | Leonidas Poulopoulos | |
127 | a3af8464 | Leonidas Poulopoulos | INSTALLED_APPS = ( |
128 | 049a5a10 | Leonidas Poulopoulos | 'monkey_patch', |
129 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.auth', |
130 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.contenttypes', |
131 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.sessions', |
132 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.sites', |
133 | a3af8464 | Leonidas Poulopoulos | 'django.contrib.messages', |
134 | 4d02b9bc | Leonidas Poulopoulos | 'django.contrib.flatpages', |
135 | a3af8464 | Leonidas Poulopoulos | 'flowspec', |
136 | 049a5a10 | Leonidas Poulopoulos | 'poller', |
137 | 94fa54a3 | Leonidas Poulopoulos | 'south', |
138 | a3af8464 | Leonidas Poulopoulos | # Uncomment the next line to enable the admin: |
139 | 049a5a10 | Leonidas Poulopoulos | 'django.contrib.admin', |
140 | a3af8464 | Leonidas Poulopoulos | # Uncomment the next line to enable admin documentation: |
141 | 049a5a10 | Leonidas Poulopoulos | 'django.contrib.admindocs', |
142 | 049a5a10 | Leonidas Poulopoulos | 'django_extensions', |
143 | 049a5a10 | Leonidas Poulopoulos | 'djcelery', |
144 | 049a5a10 | Leonidas Poulopoulos | 'peers', |
145 | ba7099ee | Leonidas Poulopoulos | 'registration', |
146 | 049a5a10 | Leonidas Poulopoulos | 'accounts' |
147 | a3af8464 | Leonidas Poulopoulos | ) |
148 | 049a5a10 | Leonidas Poulopoulos | |
149 | 049a5a10 | Leonidas Poulopoulos | LOGIN_URL = '/fod/welcome' |
150 | 049a5a10 | Leonidas Poulopoulos | |
151 | b4401a0c | Leonidas Poulopoulos | CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=3600" |
152 | 049a5a10 | Leonidas Poulopoulos | |
153 | 049a5a10 | Leonidas Poulopoulos | AUTH_PROFILE_MODULE = 'accounts.UserProfile' |
154 | 049a5a10 | Leonidas Poulopoulos | |
155 | 049a5a10 | Leonidas Poulopoulos | NETCONF_DEVICE = "" |
156 | 049a5a10 | Leonidas Poulopoulos | NETCONF_USER = "" |
157 | 049a5a10 | Leonidas Poulopoulos | NETCONF_PASS = "" |
158 | 049a5a10 | Leonidas Poulopoulos | ROUTES_FILTER = "<configuration><routing-options><flow/></routing-options></configuration>" |
159 | 049a5a10 | Leonidas Poulopoulos | ROUTE_FILTER = "<configuration><routing-options><flow><route><name>%s</name></route></flow></routing-options></configuration>" |
160 | 049a5a10 | Leonidas Poulopoulos | COMMIT_CONFIRMED_TIMEOUT = "120" |
161 | 049a5a10 | Leonidas Poulopoulos | EXPIRATION_DAYS_OFFSET = 7 |
162 | 049a5a10 | Leonidas Poulopoulos | COMMIT = True |
163 | 049a5a10 | Leonidas Poulopoulos | |
164 | 049a5a10 | Leonidas Poulopoulos | USE_X_FORWARDED_HOST = True |
165 | 049a5a10 | Leonidas Poulopoulos | |
166 | 049a5a10 | Leonidas Poulopoulos | BROKER_HOST = "localhost" |
167 | 049a5a10 | Leonidas Poulopoulos | BROKER_PORT = 11300 |
168 | 049a5a10 | Leonidas Poulopoulos | POLLS_TUBE = 'polls' |
169 | 424e79da | Leonidas Poulopoulos | |
170 | 049a5a10 | Leonidas Poulopoulos | BROKER_VHOST = "/" |
171 | 049a5a10 | Leonidas Poulopoulos | CELERY_CONCURRENCY = 1 |
172 | 049a5a10 | Leonidas Poulopoulos | |
173 | 049a5a10 | Leonidas Poulopoulos | # List of modules to import when celery starts. |
174 | 049a5a10 | Leonidas Poulopoulos | CELERY_IMPORTS = ("flowspec.tasks", ) |
175 | 049a5a10 | Leonidas Poulopoulos | |
176 | fcaef996 | Leonidas Poulopoulos | SERVER_EMAIL = "GRNET FoD Service <noreply@grnet.gr>" |
177 | b4401a0c | Leonidas Poulopoulos | EMAIL_SUBJECT_PREFIX = "[FoD] " |
178 | b4401a0c | Leonidas Poulopoulos | |
179 | b4401a0c | Leonidas Poulopoulos | LOG_FILE_LOCATION = here("log") |
180 | b4401a0c | Leonidas Poulopoulos | |
181 | b4401a0c | Leonidas Poulopoulos | EXPIRATION_NOTIFY_DAYS = 4 |
182 | 424e79da | Leonidas Poulopoulos | PREFIX_LENGTH = 29 |
183 | b4401a0c | Leonidas Poulopoulos | POLL_SESSION_UPDATE = 60.0 |
184 | 049a5a10 | Leonidas Poulopoulos | |
185 | 049a5a10 | Leonidas Poulopoulos | BROKER_URL = "beanstalk://localhost:11300//" |
186 | 049a5a10 | Leonidas Poulopoulos | |
187 | 398213bb | Leonidas Poulopoulos | SHIB_AUTH_ENTITLEMENT = 'urn:mace' |
188 | 735ba631 | Leonidas Poulopoulos | SHIB_ADMIN_DOMAIN = 'grnet.gr' |
189 | 627e731e | Leonidas Poulopoulos | SHIB_LOGOUT_URL = 'https://example.com/Shibboleth.sso/Logout' |
190 | 735ba631 | Leonidas Poulopoulos | |
191 | 43e360e3 | Leonidas Poulopoulos | # BCC mail addresses |
192 | 43e360e3 | Leonidas Poulopoulos | NOTIFY_ADMIN_MAILS = ["admin@admin.com"] |
193 | 424e79da | Leonidas Poulopoulos | |
194 | 424e79da | Leonidas Poulopoulos | UI_USER_THEN_ACTIONS = ['discard', 'rate-limit'] |
195 | 94fa54a3 | Leonidas Poulopoulos | UI_USER_PROTOCOLS = ['icmp', 'tcp', 'udp'] |
196 | 424e79da | Leonidas Poulopoulos | |
197 | 424e79da | Leonidas Poulopoulos | PROTECTED_SUBNETS = ['10.10.0.0/16'] |
198 | 424e79da | Leonidas Poulopoulos | |
199 | 15d4014d | Leonidas Poulopoulos | CELERYBEAT_SCHEDULE = { |
200 | 735ba631 | Leonidas Poulopoulos | "every-day-sync": { |
201 | 735ba631 | Leonidas Poulopoulos | "task": "flowspec.tasks.check_sync", |
202 | b4401a0c | Leonidas Poulopoulos | "schedule": crontab(minute=01, hour=01), |
203 | 735ba631 | Leonidas Poulopoulos | "args": (), |
204 | 735ba631 | Leonidas Poulopoulos | }, |
205 | 15d4014d | Leonidas Poulopoulos | "notify-expired": { |
206 | 15d4014d | Leonidas Poulopoulos | "task": "flowspec.tasks.notify_expired", |
207 | 15d4014d | Leonidas Poulopoulos | "schedule": crontab(minute=01, hour=02), |
208 | 15d4014d | Leonidas Poulopoulos | "args": (), |
209 | 15d4014d | Leonidas Poulopoulos | }, |
210 | 43e360e3 | Leonidas Poulopoulos | } |
211 | 1534e9c2 | Leonidas Poulopoulos | # whois |
212 | 1534e9c2 | Leonidas Poulopoulos | PRIMARY_WHOIS = 'whois.grnet.gr' |
213 | 1534e9c2 | Leonidas Poulopoulos | ALTERNATE_WHOIS = 'whois.ripe.net' |
214 | 43e360e3 | Leonidas Poulopoulos | |
215 | c9cb8214 | Leonidas Poulopoulos | ACCOUNT_ACTIVATION_DAYS = 7 |