Statistics
| Branch: | Tag: | Revision:

root / settings.py.dist @ e646ebe5

History | View | Annotate | Download (4.7 kB)

1
# -*- coding: utf-8 -*-
2

    
3
# Django settings for synnefo project.
4
import os
5

    
6
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
7

    
8
DEBUG = True
9
TEMPLATE_DEBUG = DEBUG
10

    
11
ADMINS = (
12
    # ('Your Name', 'your_email@domain.com'),
13
)
14

    
15
MANAGERS = ADMINS
16

    
17
DATABASES = {
18
    'default': {
19
        # 'postgresql_psycopg2', 'postgresql','mysql', 'sqlite3' or 'oracle'
20
        'ENGINE': 'sqlite3',
21
         # ATTENTION: This *must* be the absolute path if using sqlite3.
22
         # See: http://docs.djangoproject.com/en/dev/ref/settings/#name
23
        'NAME': PROJECT_PATH + 'database.sqlite',
24
        'USER': '',                      # Not used with sqlite3.
25
        'PASSWORD': '',                  # Not used with sqlite3.
26
        # Set to empty string for localhost. Not used with sqlite3.
27
        'HOST': '',
28
        # Set to empty string for default. Not used with sqlite3.
29
        'PORT': '',
30
        # Uncomment for MySQL
31
        #'OPTIONS': {
32
        #   'init_command': 'SET storage_engine=INNODB',
33
        #}
34
    }
35
}
36

    
37
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
38

    
39
# Local time zone for this installation. Choices can be found here:
40
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
41
# although not all choices may be available on all operating systems.
42
# On Unix systems, a value of None will cause Django to use the same
43
# timezone as the operating system.
44
# If running in a Windows environment this must be set to the same as your
45
# system time zone.
46
TIME_ZONE = 'UTC'
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 = '/media/'
75

    
76
# our REST API would prefer to be explicit about trailing slashes
77
APPEND_SLASH = False
78

    
79
# Make this unique, and don't share it with anybody.
80
SECRET_KEY = 'ly6)mw6a7x%n)-e#zzk4jo6f2=uqu!1o%)2-(7lo+f9yd^k^bg'
81

    
82
# List of callables that know how to import templates from various sources.
83
TEMPLATE_LOADERS = (
84
    'django.template.loaders.filesystem.Loader',
85
    'django.template.loaders.app_directories.Loader',
86
#     'django.template.loaders.eggs.Loader',
87
)
88

    
89
TEMPLATE_CONTEXT_PROCESSORS = (
90
    'django.core.context_processors.request',
91
    'django.core.context_processors.i18n',
92
    'django.contrib.auth.context_processors.auth',
93
)
94

    
95
MIDDLEWARE_CLASSES = (
96
    'django.contrib.sessions.middleware.SessionMiddleware',
97
    'django.middleware.locale.LocaleMiddleware',
98
    'django.middleware.common.CommonMiddleware',
99
    'synnefo.middleware.StripURLMiddleware',
100
    'django.contrib.auth.middleware.AuthenticationMiddleware',
101
    'django.contrib.messages.middleware.MessageMiddleware',
102
)
103

    
104
ROOT_URLCONF = 'synnefo.urls'
105

    
106
TEMPLATE_DIRS = (
107
    # Put strings here, like "/home/html/django_templates"
108
    # or "C:/www/django/templates".
109
    # Always use forward slashes, even on Windows.
110
    # Don't forget to use absolute paths, not relative paths.
111
)
112

    
113
INSTALLED_APPS = (
114
    'django.contrib.auth',
115
    'django.contrib.contenttypes',
116
    'django.contrib.sessions',
117
    'django.contrib.sites',
118
    'django.contrib.messages',
119
    'django.contrib.admin',
120
    # 'django.contrib.admindocs',
121
    'synnefo.auth',
122
    'synnefo.api',
123
    'synnefo.ui',
124
    'synnefo.db',
125
    'synnefo.ganeti',
126
)
127

    
128
GANETI_CLUSTER_INFO = ("62.217.120.78", 5080, "synnefo", "ocean!")
129

    
130
# ganeti requires each machine to have a unique name
131
BACKEND_PREFIX_ID = "snf-"
132

    
133
LANGUAGES = (
134
  ('el', u'Ελληνικά'),
135
  ('en', 'English'),
136
)
137

    
138
# needed for django. this is the class that implements the User system.
139
# We use this to allow users to add stuff for themselves (about, image etc)
140
#http://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles
141
AUTH_PROFILE_MODULE = 'synnefo.OceanUser'
142

    
143
# after this time passes and the client gets no response,
144
# it raises an alert that there are network problems
145
TIMEOUT = 10 * 1000
146

    
147
POLL_LIMIT = 3600
148
#maximum number of seconds, needed for server and images polling
149

    
150
GANETI_ZMQ_PUBLISHER = "tcp://62.217.120.67:5801"