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