Statistics
| Branch: | Tag: | Revision:

root / commissioning / servers / fscrud / fscrud_django / settings.py @ 9619cc64

History | View | Annotate | Download (3.2 kB)

1

    
2
DEBUG = True
3
TEMPLATE_DEBUG = DEBUG
4

    
5
FSCRUD_QUEUE_PATH = '/var/lib/fscrude/queue'
6
FSCRUD_DATA_ROOT = '/var/lib/fscrude/data'
7

    
8
DATABASES = {
9
    'default': {
10
        # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
11
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
12
        'NAME': 'holder',               # Or path to database file if using sqlite3.
13
        'USER': 'holder',               # Not used with sqlite3.
14
        'PASSWORD': 'holder',           # Not used with sqlite3.
15
        'HOST': '127.0.0.1',            # Set to empty string for localhost. Not used with sqlite3.
16
        'PORT': '5432',                 # Set to empty string for default. Not used with sqlite3.
17
    }
18
}
19

    
20
from commissioning.utils.pyconf import pyconf_globals
21
pyconf_globals('/etc/fscrud/django.conf')
22

    
23
import sys
24
sys.stderr = sys.stdout
25

    
26
COMMISSIONING_APP_NAME = 'fscrud'
27

    
28
ADMINS = (
29
    # ('Your Name', 'your_email@domain.com'),
30
)
31

    
32
MANAGERS = ADMINS
33

    
34
TIME_ZONE = 'UTC'
35

    
36
# Language code for this installation. All choices can be found here:
37
# http://www.i18nguy.com/unicode/language-identifiers.html
38
LANGUAGE_CODE = 'en-us'
39

    
40
SITE_ID = 1
41

    
42
# If you set this to False, Django will make some optimizations so as not
43
# to load the internationalization machinery.
44
USE_I18N = False
45

    
46
# If you set this to False, Django will not format dates, numbers and
47
# calendars according to the current locale
48
USE_L10N = False
49

    
50
# Make this unique, and don't share it with anybody.
51
SECRET_KEY = 'ee=*x%x6sp=hcm7j4zzkvpam27g*7*d59fca-q!azaqma!jx*+'
52

    
53
# List of callables that know how to import templates from various sources.
54
TEMPLATE_LOADERS = (
55
    'django.template.loaders.filesystem.Loader',
56
    'django.template.loaders.app_directories.Loader',
57
#     'django.template.loaders.eggs.Loader',
58
)
59

    
60
MIDDLEWARE_CLASSES = (
61
    'django.middleware.common.CommonMiddleware',
62
    #'django.middleware.transaction.TransactionMiddleware',
63
    #'django.contrib.sessions.middleware.SessionMiddleware',
64
    #'django.middleware.csrf.CsrfViewMiddleware',
65
    #'django.contrib.auth.middleware.AuthenticationMiddleware',
66
    #'django.contrib.messages.middleware.MessageMiddleware',
67
)
68

    
69
ROOT_URLCONF = 'commissioning.servers.fscrud.urls'
70

    
71
TEMPLATE_DIRS = (
72
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
73
    # Always use forward slashes, even on Windows.
74
    # Don't forget to use absolute paths, not relative paths.
75
)
76

    
77

    
78
INSTALLED_APPS = (
79
    #'django.contrib.auth',
80
    'django.contrib.contenttypes',
81
    #'django.contrib.sessions',
82
    #'django.contrib.sites',
83
    #'django.contrib.messages',
84
    'commissioning.controllers.django_controller',
85
    'commissioning.servers.django_server.server_app',
86
    #'commissioning.servers.django_server.server_app',
87
    # Uncomment the next line to enable the admin:
88
    # 'django.contrib.admin',
89
    # Uncomment the next line to enable admin documentation:
90
    # 'django.contrib.admindocs',
91
)
92

    
93
names = COMMISSIONING_APP_NAME.split(',')
94
names = ('commissioning.servers.%s.django_backend' % (n,) for n in names)
95
from django.utils.importlib import import_module
96

    
97
applist = []
98
for name in names:
99
    try:
100
        import_module(name)
101
        applist.append(name)
102
    except ImportError:
103
        pass
104

    
105
INSTALLED_APPS += tuple(applist)
106