Statistics
| Branch: | Tag: | Revision:

root / settings.py.dist @ 09c936a7

History | View | Annotate | Download (4.4 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
        'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
20
         # ATTENTION: This *must* be the absolute path if using sqlite3.
21
         # See: http://docs.djangoproject.com/en/dev/ref/settings/#name
22
        'NAME': PROJECT_PATH + 'database.sqlite',
23
        'USER': '',                      # Not used with sqlite3.
24
        'PASSWORD': '',                  # Not used with sqlite3.
25
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
26
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
27
    }
28
}
29

    
30
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
31

    
32
# Local time zone for this installation. Choices can be found here:
33
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
34
# although not all choices may be available on all operating systems.
35
# On Unix systems, a value of None will cause Django to use the same
36
# timezone as the operating system.
37
# If running in a Windows environment this must be set to the same as your
38
# system time zone.
39
TIME_ZONE = 'America/Chicago'
40

    
41
# Language code for this installation. All choices can be found here:
42
# http://www.i18nguy.com/unicode/language-identifiers.html
43
LANGUAGE_CODE = 'en-us'
44

    
45
SITE_ID = 1
46

    
47
# If you set this to False, Django will make some optimizations so as not
48
# to load the internationalization machinery.
49
USE_I18N = True
50

    
51
# If you set this to False, Django will not format dates, numbers and
52
# calendars according to the current locale
53
USE_L10N = True
54

    
55
# Absolute path to the directory that holds media.
56
# Example: "/home/media/media.lawrence.com/"
57
MEDIA_ROOT = ''
58

    
59
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
60
# trailing slash if there is a path component (optional in other cases).
61
# Examples: "http://media.lawrence.com", "http://example.com/media/"
62
MEDIA_URL = ''
63

    
64
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
65
# trailing slash.
66
# Examples: "http://foo.com/media/", "/media/".
67
ADMIN_MEDIA_PREFIX = '/media/'
68

    
69
# our REST API would prefer to be explicit about trailing slashes
70
APPEND_SLASH = False
71

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

    
75
# List of callables that know how to import templates from various sources.
76
TEMPLATE_LOADERS = (
77
    'django.template.loaders.filesystem.Loader',
78
    'django.template.loaders.app_directories.Loader',
79
#     'django.template.loaders.eggs.Loader',
80
)
81

    
82
TEMPLATE_CONTEXT_PROCESSORS = (
83
    'django.core.context_processors.request',
84
    'django.core.context_processors.i18n',
85
    'django.contrib.auth.context_processors.auth',
86
)
87

    
88
MIDDLEWARE_CLASSES = (
89
    'django.contrib.sessions.middleware.SessionMiddleware',
90
    'django.middleware.locale.LocaleMiddleware',
91
    'django.middleware.common.CommonMiddleware',
92
    'synnefo.middleware.StripURLMiddleware',
93
    'django.contrib.auth.middleware.AuthenticationMiddleware',
94
    'django.contrib.messages.middleware.MessageMiddleware',
95
)
96

    
97
ROOT_URLCONF = 'synnefo.urls'
98

    
99
TEMPLATE_DIRS = (
100
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
101
    # Always use forward slashes, even on Windows.
102
    # Don't forget to use absolute paths, not relative paths.
103
)
104

    
105
INSTALLED_APPS = (
106
    'django.contrib.auth',
107
    'django.contrib.contenttypes',
108
    'django.contrib.sessions',
109
    'django.contrib.sites',
110
    'django.contrib.messages',
111
    'django.contrib.admin',
112
    # 'django.contrib.admindocs',
113
    'synnefo.auth',
114
    'synnefo.api',
115
    'synnefo.ui',
116
    'synnefo.db',
117
    'synnefo.ganeti',
118
    'synnefo.logic',
119
)
120

    
121
GANETI_CLUSTER_INFO = ("62.217.120.78",5080,"synnefo","ocean!")
122
BACKEND_PREFIX_ID = "snf-" #ganeti needs each machine to have a unique name
123

    
124
LANGUAGES = (
125
  ('el', u'Ελληνικά'),
126
  ('en', 'English'),
127
)
128

    
129
AUTH_PROFILE_MODULE = 'synnefo.OceanUser' 
130
#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
#http://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles
132

    
133
TIMEOUT = 10*1000
134
#after this time passes and the client gets no response, it raises an alert that there are network problems
135