Revision 4a669c71 snf-pithos-app/pithos/api/synnefo_settings.py

b/snf-pithos-app/pithos/api/synnefo_settings.py
1
#coding=utf8
2
# Django settings for pithos project.
3

  
4
from os.path import abspath, dirname, exists, join
5

  
6
PROJECT_PATH = dirname(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': 'django.db.backends.sqlite3',
20
        'NAME': join(PROJECT_PATH, 'pithos.db')
21
    }
22
}
23

  
24
# Local time zone for this installation. Choices can be found here:
25
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26
# although not all choices may be available on all operating systems.
27
# If running in a Windows environment this must be set to the same as your
28
# system time zone.
29
TIME_ZONE = 'UTC'
30

  
31
# Language code for this installation. All choices can be found here:
32
# http://www.i18nguy.com/unicode/language-identifiers.html
33
LANGUAGE_CODE = 'en-us'
34

  
35
SITE_ID = 1
36

  
37
# If you set this to False, Django will make some optimizations so as not
38
# to load the internationalization machinery.
39
USE_I18N = True
40

  
41
# If you set this to False, Django will not format dates, numbers and
42
# calendars according to the current locale
43
USE_L10N = True
44

  
45
# Absolute path to the directory that holds media.
46
# Example: "/home/media/media.lawrence.com/"
47
MEDIA_ROOT = ''
48

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

  
54
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
55
# trailing slash.
56
# Examples: "http://foo.com/media/", "/media/".
57
ADMIN_MEDIA_PREFIX = '/media/'
58

  
59
# Make this unique, and don't share it with anybody.
60
SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si'
61

  
62
# List of callables that know how to import templates from various sources.
63
TEMPLATE_LOADERS = (
64
    'django.template.loaders.filesystem.Loader',
65
    'django.template.loaders.app_directories.Loader',
66
)
67

  
68
MIDDLEWARE_CLASSES = (
69
    'django.middleware.common.CommonMiddleware',
70
    #'django.middleware.csrf.CsrfViewMiddleware',
71
    #'django.contrib.sessions.middleware.SessionMiddleware',
72
    #'django.contrib.auth.middleware.AuthenticationMiddleware',
73
    #'django.contrib.messages.middleware.MessageMiddleware',
74
    'pithos.middleware.LoggingConfigMiddleware',
75
    'pithos.middleware.SecureMiddleware'
76
)
77

  
78
ROOT_URLCONF = 'pithos.urls'
79

  
80
TEMPLATE_DIRS = (
81
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
82
    # Always use forward slashes, even on Windows.
83
    # Don't forget to use absolute paths, not relative paths.
84
)
85

  
86 1
# Setup logging (use this name for the setting to avoid conflicts with django > 1.2.x).
87 2
LOGGING_SETUP = {
88 3
    'version': 1,
......
111 26
    'loggers': {
112 27
        'pithos': {
113 28
            'handlers': ['console'],
114
            'level': 'DEBUG' if DEBUG else 'INFO'
29
            'level': 'INFO'
115 30
        },
116 31
    }
117 32
}
118 33

  
119
# The server is behind a proxy (apache and gunicorn setup).
120
USE_X_FORWARDED_HOST = False
121

  
122
# Set umask (needed for gunicorn setup).
123
#umask(0077)
124

  
125
conf = join(PROJECT_PATH, 'settings.local')
126
if exists(conf):
127
    execfile(conf)
128
elif exists('/etc/pithos/settings.local'):
129
    execfile('/etc/pithos/settings.local')
130

  
131
INSTALLED_APPS = (
132
    'pithos.api',
133
)

Also available in: Unified diff