Statistics
| Branch: | Tag: | Revision:

root / conf / ci / settings.py.sqlite @ 6110651e

History | View | Annotate | Download (4.4 kB)

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