1 # Django settings for flowspy project.
5 djcelery.setup_loader()
6 from celery.schedules import crontab
12 ('Admin', 'admin_mail@admin.ad'),
16 here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
24 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
25 'NAME': '', # Or path to database file if using sqlite3.
26 'USER': '', # Not used with sqlite3.
27 'PASSWORD': '', # Not used with sqlite3.
28 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
29 'PORT': '', # Set to empty string for default. Not used with sqlite3.
31 "init_command": "SET storage_engine=INNODB",
36 # Local time zone for this installation. Choices can be found here:
37 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
38 # although not all choices may be available on all operating systems.
39 # On Unix systems, a value of None will cause Django to use the same
40 # timezone as the operating system.
41 # If running in a Windows environment this must be set to the same as your
43 TIME_ZONE = 'Europe/Athens'
45 # Language code for this installation. All choices can be found here:
46 # http://www.i18nguy.com/unicode/language-identifiers.html
54 # Language code for this installation. All choices can be found here:
55 # http://www.i18nguy.com/unicode/language-identifiers.html
56 LANGUAGE_CODE = 'en-us'
60 # If you set this to False, Django will make some optimizations so as not
61 # to load the internationalization machinery.
64 # If you set this to False, Django will not format dates, numbers and
65 # calendars according to the current locale
68 # Absolute path to the directory that holds media.
69 # Example: "/home/media/media.lawrence.com/"
72 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
73 # trailing slash if there is a path component (optional in other cases).
74 # Examples: "http://media.lawrence.com", "http://example.com/media/"
77 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
79 # Examples: "http://foo.com/media/", "/media/".
80 ADMIN_MEDIA_PREFIX = '/admin/media/'
82 # Make this unique, and don't share it with anybody.
83 SECRET_KEY = 'fju0e4zu-thi7qf@93voi5eeot21@a*e54)%89xe-7iorqcimk'
85 # List of callables that know how to import templates from various sources.
87 'django.template.loaders.filesystem.Loader',
88 'django.template.loaders.app_directories.Loader',
89 # 'django.template.loaders.eggs.Loader',
92 TEMPLATE_CONTEXT_PROCESSORS = (
93 "django.contrib.auth.context_processors.auth",
94 "django.core.context_processors.debug",
95 "django.core.context_processors.i18n",
96 "django.core.context_processors.media",
97 "django.contrib.messages.context_processors.messages"
100 MIDDLEWARE_CLASSES = (
101 'django.middleware.cache.UpdateCacheMiddleware',
102 'django.middleware.common.CommonMiddleware',
103 'django.contrib.sessions.middleware.SessionMiddleware',
104 'django.middleware.csrf.CsrfViewMiddleware',
105 'django.contrib.auth.middleware.AuthenticationMiddleware',
106 'django.contrib.messages.middleware.MessageMiddleware',
107 'django.middleware.cache.FetchFromCacheMiddleware',
110 AUTHENTICATION_BACKENDS = (
111 'flowspy.djangobackends.shibauthBackend.shibauthBackend',
112 'django.contrib.auth.backends.ModelBackend',
115 ROOT_URLCONF = 'flowspy.urls'
117 STATIC_URL = '/home/leopoul/projects/flowspy/static'
120 '/home/leopoul/projects/flowspy/templates/',
121 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
122 # Always use forward slashes, even on Windows.
123 # Don't forget to use absolute paths, not relative paths.
128 'django.contrib.auth',
129 'django.contrib.contenttypes',
130 'django.contrib.sessions',
131 'django.contrib.sites',
132 'django.contrib.messages',
136 # Uncomment the next line to enable the admin:
137 'django.contrib.admin',
138 # Uncomment the next line to enable admin documentation:
139 'django.contrib.admindocs',
146 LOGIN_URL = '/fod/welcome'
148 CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=3600"
150 AUTH_PROFILE_MODULE = 'accounts.UserProfile'
156 ROUTES_FILTER = "<configuration><routing-options><flow/></routing-options></configuration>"
157 ROUTE_FILTER = "<configuration><routing-options><flow><route><name>%s</name></route></flow></routing-options></configuration>"
158 COMMIT_CONFIRMED_TIMEOUT = "120"
159 EXPIRATION_DAYS_OFFSET = 7
162 USE_X_FORWARDED_HOST = True
164 BROKER_HOST = "localhost"
168 CELERY_CONCURRENCY = 1
170 # List of modules to import when celery starts.
171 CELERY_IMPORTS = ("flowspec.tasks", )
173 SERVER_EMAIL = "noreply@grnet.gr"
174 EMAIL_SUBJECT_PREFIX = "[FoD] "
176 LOG_FILE_LOCATION = here("log")
178 EXPIRATION_NOTIFY_DAYS = 4
180 POLL_SESSION_UPDATE = 60.0
182 BROKER_URL = "beanstalk://localhost:11300//"
184 SHIB_AUTH_AFFILIATION = 'urn:mace:grnet.gr:pki:user'
185 SHIB_ADMIN_DOMAIN = 'grnet.gr'
186 SHIB_LOGOUT_URL = 'https://netdev.grnet.gr/Shibboleth.sso/Logout'
188 CELERYBEAT_SCHEDULE = {
189 # Executes every day at 01:35 AM
191 "task": "flowspec.tasks.check_sync",
192 "schedule": crontab(minute=01, hour=01),