root / settings.py.dist @ dd53338a
History | View | Annotate | Download (4.9 kB)
1 | d7f0ad6e | provetza | # -*- coding: utf-8 -*- |
---|---|---|---|
2 | d7f0ad6e | provetza | |
3 | 00b4f1be | Faidon Liambotis | # Django settings for synnefo project. |
4 | 619b1c87 | Markos Gogoulos | import os |
5 | 619b1c87 | Markos Gogoulos | |
6 | 619b1c87 | Markos Gogoulos | PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/' |
7 | 00b4f1be | Faidon Liambotis | |
8 | 00b4f1be | Faidon Liambotis | DEBUG = True |
9 | 00b4f1be | Faidon Liambotis | TEMPLATE_DEBUG = DEBUG |
10 | 00b4f1be | Faidon Liambotis | |
11 | 00b4f1be | Faidon Liambotis | ADMINS = ( |
12 | 00b4f1be | Faidon Liambotis | # ('Your Name', 'your_email@domain.com'), |
13 | 00b4f1be | Faidon Liambotis | ) |
14 | 00b4f1be | Faidon Liambotis | |
15 | 00b4f1be | Faidon Liambotis | MANAGERS = ADMINS |
16 | 00b4f1be | Faidon Liambotis | |
17 | 00b4f1be | Faidon Liambotis | DATABASES = { |
18 | 00b4f1be | Faidon Liambotis | 'default': { |
19 | e646ebe5 | Dimitris Moraitis | # 'postgresql_psycopg2', 'postgresql','mysql', 'sqlite3' or 'oracle' |
20 | e646ebe5 | Dimitris Moraitis | 'ENGINE': 'sqlite3', |
21 | dd8d34ae | Vangelis Koukis | # ATTENTION: This *must* be the absolute path if using sqlite3. |
22 | dd8d34ae | Vangelis Koukis | # See: http://docs.djangoproject.com/en/dev/ref/settings/#name |
23 | 619b1c87 | Markos Gogoulos | 'NAME': PROJECT_PATH + 'database.sqlite', |
24 | 00b4f1be | Faidon Liambotis | 'USER': '', # Not used with sqlite3. |
25 | 00b4f1be | Faidon Liambotis | 'PASSWORD': '', # Not used with sqlite3. |
26 | e646ebe5 | Dimitris Moraitis | # Set to empty string for localhost. Not used with sqlite3. |
27 | e646ebe5 | Dimitris Moraitis | 'HOST': '', |
28 | e646ebe5 | Dimitris Moraitis | # Set to empty string for default. Not used with sqlite3. |
29 | e646ebe5 | Dimitris Moraitis | 'PORT': '', |
30 | d4633820 | Faidon Liambotis | # Uncomment for MySQL |
31 | d4633820 | Faidon Liambotis | #'OPTIONS': { |
32 | d4633820 | Faidon Liambotis | # 'init_command': 'SET storage_engine=INNODB', |
33 | d4633820 | Faidon Liambotis | #} |
34 | 00b4f1be | Faidon Liambotis | } |
35 | 00b4f1be | Faidon Liambotis | } |
36 | 00b4f1be | Faidon Liambotis | |
37 | db3dccf4 | Dimitris Moraitis | SESSION_ENGINE = "django.contrib.sessions.backends.cache" |
38 | db3dccf4 | Dimitris Moraitis | |
39 | 00b4f1be | Faidon Liambotis | # Local time zone for this installation. Choices can be found here: |
40 | 00b4f1be | Faidon Liambotis | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
41 | 00b4f1be | Faidon Liambotis | # although not all choices may be available on all operating systems. |
42 | 00b4f1be | Faidon Liambotis | # On Unix systems, a value of None will cause Django to use the same |
43 | 00b4f1be | Faidon Liambotis | # timezone as the operating system. |
44 | 00b4f1be | Faidon Liambotis | # If running in a Windows environment this must be set to the same as your |
45 | 00b4f1be | Faidon Liambotis | # system time zone. |
46 | 2a68a5ff | Giorgos Verigakis | TIME_ZONE = 'UTC' # Warning: API depends on the TIME_ZONE being UTC |
47 | 00b4f1be | Faidon Liambotis | |
48 | 00b4f1be | Faidon Liambotis | # Language code for this installation. All choices can be found here: |
49 | 00b4f1be | Faidon Liambotis | # http://www.i18nguy.com/unicode/language-identifiers.html |
50 | 00b4f1be | Faidon Liambotis | LANGUAGE_CODE = 'en-us' |
51 | 00b4f1be | Faidon Liambotis | |
52 | 00b4f1be | Faidon Liambotis | SITE_ID = 1 |
53 | 00b4f1be | Faidon Liambotis | |
54 | 00b4f1be | Faidon Liambotis | # If you set this to False, Django will make some optimizations so as not |
55 | 00b4f1be | Faidon Liambotis | # to load the internationalization machinery. |
56 | 00b4f1be | Faidon Liambotis | USE_I18N = True |
57 | 00b4f1be | Faidon Liambotis | |
58 | 00b4f1be | Faidon Liambotis | # If you set this to False, Django will not format dates, numbers and |
59 | 00b4f1be | Faidon Liambotis | # calendars according to the current locale |
60 | 00b4f1be | Faidon Liambotis | USE_L10N = True |
61 | 00b4f1be | Faidon Liambotis | |
62 | 00b4f1be | Faidon Liambotis | # Absolute path to the directory that holds media. |
63 | 00b4f1be | Faidon Liambotis | # Example: "/home/media/media.lawrence.com/" |
64 | 00b4f1be | Faidon Liambotis | MEDIA_ROOT = '' |
65 | 00b4f1be | Faidon Liambotis | |
66 | 00b4f1be | Faidon Liambotis | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
67 | 00b4f1be | Faidon Liambotis | # trailing slash if there is a path component (optional in other cases). |
68 | 00b4f1be | Faidon Liambotis | # Examples: "http://media.lawrence.com", "http://example.com/media/" |
69 | 00b4f1be | Faidon Liambotis | MEDIA_URL = '' |
70 | 00b4f1be | Faidon Liambotis | |
71 | 00b4f1be | Faidon Liambotis | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
72 | 00b4f1be | Faidon Liambotis | # trailing slash. |
73 | 00b4f1be | Faidon Liambotis | # Examples: "http://foo.com/media/", "/media/". |
74 | 00b4f1be | Faidon Liambotis | ADMIN_MEDIA_PREFIX = '/media/' |
75 | 00b4f1be | Faidon Liambotis | |
76 | 81357279 | Faidon Liambotis | # our REST API would prefer to be explicit about trailing slashes |
77 | 81357279 | Faidon Liambotis | APPEND_SLASH = False |
78 | 81357279 | Faidon Liambotis | |
79 | 00b4f1be | Faidon Liambotis | # Make this unique, and don't share it with anybody. |
80 | 00b4f1be | Faidon Liambotis | SECRET_KEY = 'ly6)mw6a7x%n)-e#zzk4jo6f2=uqu!1o%)2-(7lo+f9yd^k^bg' |
81 | 00b4f1be | Faidon Liambotis | |
82 | 00b4f1be | Faidon Liambotis | # List of callables that know how to import templates from various sources. |
83 | 00b4f1be | Faidon Liambotis | TEMPLATE_LOADERS = ( |
84 | 00b4f1be | Faidon Liambotis | 'django.template.loaders.filesystem.Loader', |
85 | 00b4f1be | Faidon Liambotis | 'django.template.loaders.app_directories.Loader', |
86 | 00b4f1be | Faidon Liambotis | # 'django.template.loaders.eggs.Loader', |
87 | 00b4f1be | Faidon Liambotis | ) |
88 | 00b4f1be | Faidon Liambotis | |
89 | d7f0ad6e | provetza | TEMPLATE_CONTEXT_PROCESSORS = ( |
90 | ccbd9f9b | Markos Gogoulos | 'django.core.context_processors.request', |
91 | d7f0ad6e | provetza | 'django.core.context_processors.i18n', |
92 | ccbd9f9b | Markos Gogoulos | 'django.contrib.auth.context_processors.auth', |
93 | d7f0ad6e | provetza | ) |
94 | d7f0ad6e | provetza | |
95 | 00b4f1be | Faidon Liambotis | MIDDLEWARE_CLASSES = ( |
96 | 00b4f1be | Faidon Liambotis | 'django.contrib.sessions.middleware.SessionMiddleware', |
97 | d7f0ad6e | provetza | 'django.middleware.locale.LocaleMiddleware', |
98 | 421369dc | user | 'django.middleware.common.CommonMiddleware', |
99 | 421369dc | user | 'synnefo.middleware.StripURLMiddleware', |
100 | dd53338a | Georgios Gousios | #'django.contrib.auth.middleware.AuthenticationMiddleware', |
101 | dd53338a | Georgios Gousios | #'synnefo.api.middleware.SynnefoAuthMiddleware', |
102 | 421369dc | user | 'django.contrib.messages.middleware.MessageMiddleware', |
103 | 00b4f1be | Faidon Liambotis | ) |
104 | 00b4f1be | Faidon Liambotis | |
105 | 00b4f1be | Faidon Liambotis | ROOT_URLCONF = 'synnefo.urls' |
106 | 00b4f1be | Faidon Liambotis | |
107 | 00b4f1be | Faidon Liambotis | TEMPLATE_DIRS = ( |
108 | e646ebe5 | Dimitris Moraitis | # Put strings here, like "/home/html/django_templates" |
109 | e646ebe5 | Dimitris Moraitis | # or "C:/www/django/templates". |
110 | 00b4f1be | Faidon Liambotis | # Always use forward slashes, even on Windows. |
111 | 00b4f1be | Faidon Liambotis | # Don't forget to use absolute paths, not relative paths. |
112 | 00b4f1be | Faidon Liambotis | ) |
113 | 00b4f1be | Faidon Liambotis | |
114 | 00b4f1be | Faidon Liambotis | INSTALLED_APPS = ( |
115 | 00b4f1be | Faidon Liambotis | 'django.contrib.auth', |
116 | 00b4f1be | Faidon Liambotis | 'django.contrib.contenttypes', |
117 | 00b4f1be | Faidon Liambotis | 'django.contrib.sessions', |
118 | 00b4f1be | Faidon Liambotis | 'django.contrib.sites', |
119 | 00b4f1be | Faidon Liambotis | 'django.contrib.messages', |
120 | 78dec216 | Vassilios Karakoidas | 'django.contrib.admin', |
121 | 00b4f1be | Faidon Liambotis | # 'django.contrib.admindocs', |
122 | 3758cc42 | Faidon Liambotis | 'synnefo.auth', |
123 | 00b4f1be | Faidon Liambotis | 'synnefo.api', |
124 | 0f402f77 | Dimitris Moraitis | 'synnefo.ui', |
125 | ccbd9f9b | Markos Gogoulos | 'synnefo.db', |
126 | fee71ba1 | Markos Gogoulos | 'synnefo.ganeti', |
127 | 09c936a7 | Vassilios Karakoidas | 'synnefo.logic', |
128 | 00b4f1be | Faidon Liambotis | ) |
129 | 253f0c82 | Faidon Liambotis | |
130 | e646ebe5 | Dimitris Moraitis | GANETI_CLUSTER_INFO = ("62.217.120.78", 5080, "synnefo", "ocean!") |
131 | e646ebe5 | Dimitris Moraitis | |
132 | e646ebe5 | Dimitris Moraitis | # ganeti requires each machine to have a unique name |
133 | e646ebe5 | Dimitris Moraitis | BACKEND_PREFIX_ID = "snf-" |
134 | d7f0ad6e | provetza | |
135 | d7f0ad6e | provetza | LANGUAGES = ( |
136 | d7f0ad6e | provetza | ('el', u'Ελληνικά'), |
137 | d7f0ad6e | provetza | ('en', 'English'), |
138 | d7f0ad6e | provetza | ) |
139 | 421369dc | user | |
140 | e646ebe5 | Dimitris Moraitis | # needed for django. this is the class that implements the User system. |
141 | e646ebe5 | Dimitris Moraitis | # We use this to allow users to add stuff for themselves (about, image etc) |
142 | 275741a9 | Markos Gogoulos | #http://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles |
143 | e646ebe5 | Dimitris Moraitis | AUTH_PROFILE_MODULE = 'synnefo.OceanUser' |
144 | e646ebe5 | Dimitris Moraitis | |
145 | e646ebe5 | Dimitris Moraitis | # after this time passes and the client gets no response, |
146 | e646ebe5 | Dimitris Moraitis | # it raises an alert that there are network problems |
147 | e646ebe5 | Dimitris Moraitis | TIMEOUT = 10 * 1000 |
148 | 275741a9 | Markos Gogoulos | |
149 | 54f8cd6d | Markos Gogoulos | POLL_LIMIT = 3600 |
150 | 54f8cd6d | Markos Gogoulos | #maximum number of seconds, needed for server and images polling |
151 | c7b808db | Dimitris Moraitis | |
152 | c7b808db | Dimitris Moraitis | GANETI_ZMQ_PUBLISHER = "tcp://62.217.120.67:5801" |
153 | ef39e7ee | Georgios Gousios | |
154 | d8e50a39 | Giorgos Verigakis | API_ROOT_URL = 'http://127.0.0.1:8000/api/' |
155 | 036da2d2 | Georgios Gousios | |
156 | 036da2d2 | Georgios Gousios | SIBBOLLETH_HOST = "http://wayf.grnet.gr/" |