Fixed url matching slug regexp
[flowspy] / settings.py.dist
1 # Django settings for flowspy project.
2
3 DEBUG = True
4 TEMPLATE_DEBUG = DEBUG
5
6 ADMINS = (
7     # ('Your Name', 'your_email@domain.com'),
8 )
9
10 import djcelery
11 djcelery.setup_loader()
12
13
14 MANAGERS = ADMINS
15
16 DATABASES = {
17     'default': {
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.
24         'OPTIONS':  {
25         "init_command": "SET storage_engine=INNODB",
26 }
27     }
28 }
29
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
36 # system time zone.
37 TIME_ZONE = 'Europe/Athens'
38
39 # Language code for this installation. All choices can be found here:
40 # http://www.i18nguy.com/unicode/language-identifiers.html
41 _ = lambda s: s
42
43 LANGUAGES = (
44     ('el', _('Greek')),
45     ('en', _('English')),
46 )
47
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'
51
52 SITE_ID = 1
53
54 # If you set this to False, Django will make some optimizations so as not
55 # to load the internationalization machinery.
56 USE_I18N = True
57
58 # If you set this to False, Django will not format dates, numbers and
59 # calendars according to the current locale
60 USE_L10N = True
61
62 # Absolute path to the directory that holds media.
63 # Example: "/home/media/media.lawrence.com/"
64 MEDIA_ROOT = ''
65
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/"
69 MEDIA_URL = ''
70
71 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
72 # trailing slash.
73 # Examples: "http://foo.com/media/", "/media/".
74 ADMIN_MEDIA_PREFIX = '/admin/media/'
75
76 # Make this unique, and don't share it with anybody.
77 SECRET_KEY = 'fju0e4zu-thi7qf@93voi5eeot21@a*e54)%89xe-7iorqcimk'
78
79 # List of callables that know how to import templates from various sources.
80 TEMPLATE_LOADERS = (
81     'django.template.loaders.filesystem.Loader',
82     'django.template.loaders.app_directories.Loader',
83 #     'django.template.loaders.eggs.Loader',
84 )
85
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"
92 )
93
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',
102 )
103
104 AUTHENTICATION_BACKENDS = (
105     'flowspy.djangobackends.shibauthBackend.shibauthBackend',
106     'django.contrib.auth.backends.ModelBackend',
107 )
108
109 ROOT_URLCONF = 'flowspy.urls'
110
111 STATIC_URL = '/home/leopoul/projects/flowspy/static'
112
113 TEMPLATE_DIRS = (
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.
118 )
119
120 INSTALLED_APPS = (
121     'monkey_patch',
122     'django.contrib.auth',
123     'django.contrib.contenttypes',
124     'django.contrib.sessions',
125     'django.contrib.sites',
126     'django.contrib.messages',
127     'flowspec',
128     'poller',
129 #    'south',
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',
134     'django_extensions',
135     'djcelery',
136     'peers',
137     'accounts'
138 )
139
140 LOGIN_URL = '/fod/welcome'
141
142 CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=600"
143
144 AUTH_PROFILE_MODULE = 'accounts.UserProfile'
145
146 NETCONF_DEVICE = ""
147 NETCONF_USER = ""
148 NETCONF_PASS = ""
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
153 COMMIT = True
154
155 USE_X_FORWARDED_HOST = True
156
157 BROKER_HOST = "localhost"
158 BROKER_PORT = 11300
159 POLLS_TUBE = 'polls'
160 BROKER_VHOST = "/"
161 CELERY_CONCURRENCY = 1
162
163 # List of modules to import when celery starts.
164 CELERY_IMPORTS = ("flowspec.tasks", )
165
166 SERVER_EMAIL = "noreply@grnet.gr"
167 EMAIL_SUBJECT_PREFIX = "[fod] "
168
169 BROKER_URL = "beanstalk://localhost:11300//"
170
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'
174
175 from celery.schedules import crontab
176
177 CELERYBEAT_SCHEDULE = {
178     # Executes every day at 01:35 AM 
179     "every-day-sync": {
180         "task": "flowspec.tasks.check_sync",
181         "schedule": crontab(minute=35, hour=01),
182         "args": (),
183     },
184 }