Statistics
| Branch: | Tag: | Revision:

root / conf / ci / settings.py.postgres @ 5d87bed0

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