1 # Django settings for flowspy project.
7 # ('Your Name', 'your_email@domain.com'),
11 djcelery.setup_loader()
18 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
19 'NAME': '', # Or path to database file if using sqlite3.
20 'USER': '', # Not used with sqlite3.
21 'PASSWORD': '', # Not used with sqlite3.
22 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
23 'PORT': '', # Set to empty string for default. Not used with sqlite3.
25 "init_command": "SET storage_engine=INNODB",
30 # Local time zone for this installation. Choices can be found here:
31 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32 # although not all choices may be available on all operating systems.
33 # On Unix systems, a value of None will cause Django to use the same
34 # timezone as the operating system.
35 # If running in a Windows environment this must be set to the same as your
37 TIME_ZONE = 'Europe/Athens'
39 # Language code for this installation. All choices can be found here:
40 # http://www.i18nguy.com/unicode/language-identifiers.html
48 # Language code for this installation. All choices can be found here:
49 # http://www.i18nguy.com/unicode/language-identifiers.html
50 LANGUAGE_CODE = 'en-us'
54 # If you set this to False, Django will make some optimizations so as not
55 # to load the internationalization machinery.
58 # If you set this to False, Django will not format dates, numbers and
59 # calendars according to the current locale
62 # Absolute path to the directory that holds media.
63 # Example: "/home/media/media.lawrence.com/"
66 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
67 # trailing slash if there is a path component (optional in other cases).
68 # Examples: "http://media.lawrence.com", "http://example.com/media/"
71 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
73 # Examples: "http://foo.com/media/", "/media/".
74 ADMIN_MEDIA_PREFIX = '/admin/media/'
76 # Make this unique, and don't share it with anybody.
77 SECRET_KEY = 'fju0e4zu-thi7qf@93voi5eeot21@a*e54)%89xe-7iorqcimk'
79 # List of callables that know how to import templates from various sources.
81 'django.template.loaders.filesystem.Loader',
82 'django.template.loaders.app_directories.Loader',
83 # 'django.template.loaders.eggs.Loader',
86 TEMPLATE_CONTEXT_PROCESSORS = (
87 "django.contrib.auth.context_processors.auth",
88 "django.core.context_processors.debug",
89 "django.core.context_processors.i18n",
90 "django.core.context_processors.media",
91 "django.contrib.messages.context_processors.messages"
94 MIDDLEWARE_CLASSES = (
95 'django.middleware.cache.UpdateCacheMiddleware',
96 'django.middleware.common.CommonMiddleware',
97 'django.contrib.sessions.middleware.SessionMiddleware',
98 'django.middleware.csrf.CsrfViewMiddleware',
99 'django.contrib.auth.middleware.AuthenticationMiddleware',
100 'django.contrib.messages.middleware.MessageMiddleware',
101 'django.middleware.cache.FetchFromCacheMiddleware',
104 AUTHENTICATION_BACKENDS = (
105 'flowspy.djangobackends.shibauthBackend.shibauthBackend',
106 'django.contrib.auth.backends.ModelBackend',
109 ROOT_URLCONF = 'flowspy.urls'
111 STATIC_URL = '/home/leopoul/projects/flowspy/static'
114 '/home/leopoul/projects/flowspy/templates/',
115 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
116 # Always use forward slashes, even on Windows.
117 # Don't forget to use absolute paths, not relative paths.
122 'django.contrib.auth',
123 'django.contrib.contenttypes',
124 'django.contrib.sessions',
125 'django.contrib.sites',
126 'django.contrib.messages',
130 # Uncomment the next line to enable the admin:
131 'django.contrib.admin',
132 # Uncomment the next line to enable admin documentation:
133 'django.contrib.admindocs',
140 LOGIN_URL = '/fod/welcome'
142 CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=600"
144 AUTH_PROFILE_MODULE = 'accounts.UserProfile'
149 ROUTES_FILTER = "<configuration><routing-options><flow/></routing-options></configuration>"
150 ROUTE_FILTER = "<configuration><routing-options><flow><route><name>%s</name></route></flow></routing-options></configuration>"
151 COMMIT_CONFIRMED_TIMEOUT = "120"
152 EXPIRATION_DAYS_OFFSET = 7
155 USE_X_FORWARDED_HOST = True
157 BROKER_HOST = "localhost"
161 CELERY_CONCURRENCY = 1
163 # List of modules to import when celery starts.
164 CELERY_IMPORTS = ("flowspec.tasks", )
166 SERVER_EMAIL = "noreply@grnet.gr"
167 EMAIL_SUBJECT_PREFIX = "[fod] "
169 BROKER_URL = "beanstalk://localhost:11300//"
171 SHIB_AUTH_AFFILIATION = 'urn:mace:grnet.gr:pki:user'
172 SHIB_ADMIN_DOMAIN = 'grnet.gr'
173 SHIB_LOGOUT_URL = 'https://netdev.grnet.gr/Shibboleth.sso/Logout'
175 from celery.schedules import crontab
177 CELERYBEAT_SCHEDULE = {
178 # Executes every day at 01:35 AM
180 "task": "flowspec.tasks.check_sync",
181 "schedule": crontab(minute=35, hour=01),