source: mauRepo/MolesManager/trunk/src/MolesManager/settings.py @ 8014

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/MolesManager/settings.py@8014
Revision 8014, 5.9 KB checked in by mnagni, 8 years ago (diff)

The tables are correctly generated and the migration does not show major problem. Good!

Line 
1# Django settings for MolesManager project.
2import os
3from db_manager.dbConnection import DBConnection, DBScript
4
5DEBUG = True
6TEMPLATE_DEBUG = DEBUG
7
8ADMINS = (
9    # ('Your Name', 'your_email@example.com'),
10)
11
12MANAGERS = ADMINS
13
14DATABASES = {
15    'default': {
16        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
17        'NAME': '/misc/frigid3/humid1/mnagni/workspaces/moles3/MolesManager/src/sqlite.db',                      # Or path to database file if using sqlite3.
18        'USER': '',                      # Not used with sqlite3.
19        'PASSWORD': '',                  # Not used with sqlite3.
20        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
21        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
22    }
23}
24
25# Local time zone for this installation. Choices can be found here:
26# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
27# although not all choices may be available on all operating systems.
28# On Unix systems, a value of None will cause Django to use the same
29# timezone as the operating system.
30# If running in a Windows environment this must be set to the same as your
31# system time zone.
32TIME_ZONE = 'America/Chicago'
33
34# Language code for this installation. All choices can be found here:
35# http://www.i18nguy.com/unicode/language-identifiers.html
36LANGUAGE_CODE = 'en-us'
37
38SITE_ID = 1
39
40# If you set this to False, Django will make some optimizations so as not
41# to load the internationalization machinery.
42USE_I18N = True
43
44# If you set this to False, Django will not format dates, numbers and
45# calendars according to the current locale
46USE_L10N = True
47
48# Absolute filesystem path to the directory that will hold user-uploaded files.
49# Example: "/home/media/media.lawrence.com/media/"
50MEDIA_ROOT = ''
51
52# URL that handles the media served from MEDIA_ROOT. Make sure to use a
53# trailing slash.
54# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
55MEDIA_URL = ''
56
57# Absolute path to the directory static files should be collected to.
58# Don't put anything in this directory yourself; store your static files
59# in apps' "static/" subdirectories and in STATICFILES_DIRS.
60# Example: "/home/media/media.lawrence.com/static/"
61STATIC_ROOT = ''
62
63# URL prefix for static files.
64# Example: "http://media.lawrence.com/static/"
65STATIC_URL = '/static/'
66
67# URL prefix for admin static files -- CSS, JavaScript and images.
68# Make sure to use a trailing slash.
69# Examples: "http://foo.com/static/admin/", "/static/admin/".
70ADMIN_MEDIA_PREFIX = '/static/admin/'
71
72# Additional locations of static files
73STATICFILES_DIRS = (
74    ()
75    # Put strings here, like "/home/html/static" or "C:/www/django/static".
76    # Always use forward slashes, even on Windows.
77    # Don't forget to use absolute paths, not relative paths.
78)
79
80# List of finder classes that know how to find static files in
81# various locations.
82STATICFILES_FINDERS = (
83    'django.contrib.staticfiles.finders.FileSystemFinder',
84    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
85#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
86)
87
88# Make this unique, and don't share it with anybody.
89SECRET_KEY = '2ttix#hi63qnw0derz&0(60&65@v=@#5gg9$9r2jw5v)nccfg+'
90
91# List of callables that know how to import templates from various sources.
92TEMPLATE_LOADERS = (
93    'django.template.loaders.filesystem.Loader',
94    'django.template.loaders.app_directories.Loader',
95#     'django.template.loaders.eggs.Loader',
96)
97
98MIDDLEWARE_CLASSES = (
99    'django.middleware.common.CommonMiddleware',
100    'django.contrib.sessions.middleware.SessionMiddleware',
101    'django.middleware.csrf.CsrfViewMiddleware',
102    'django.contrib.auth.middleware.AuthenticationMiddleware',
103    'django.contrib.messages.middleware.MessageMiddleware',
104)
105
106ROOT_URLCONF = 'MolesManager.urls'
107
108TEMPLATE_DIRS = (
109    os.path.join(os.path.dirname(__file__), 'static/templates').replace('\\', '/')                 
110    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
111    # Always use forward slashes, even on Windows.
112    # Don't forget to use absolute paths, not relative paths.
113)
114
115INSTALLED_APPS = (
116    'django.contrib.auth',
117    'django.contrib.contenttypes',
118    'django.contrib.sessions',
119    'django.contrib.sites',
120    'django.contrib.messages',
121    'django.contrib.staticfiles',
122    'ea_model',
123    # Uncomment the next line to enable the admin:
124    # 'django.contrib.admin',
125    # Uncomment the next line to enable admin documentation:
126    # 'django.contrib.admindocs',
127        #This line defines where catch the /static/ folder
128)
129
130SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
131
132# A sample logging configuration. The only tangible logging
133# performed by this configuration is to send an email to
134# the site admins on every HTTP 500 error.
135# See http://docs.djangoproject.com/en/dev/topics/logging for
136# more details on how to customize your logging configuration.
137LOGGING = {
138    'version': 1,
139    'disable_existing_loggers': True,
140    'handlers': {
141        'mail_admins': {
142            'level': 'ERROR',
143            'class': 'django.utils.log.AdminEmailHandler'
144        },
145        'mmlog':{
146            'level':'DEBUG',
147            'class':'logging.FileHandler',
148            'filename': os.path.join(SITE_ROOT, 'MolesManager.log')
149        }
150    },
151    'loggers': {
152        'django.request': {
153            'handlers': ['mail_admins'],
154            'level': 'ERROR',
155            'propagate': True,
156        },
157        'myproject.custom': {
158            'handlers': ['mmlog'],
159            'level': 'DEBUG',
160            'propagate': True,
161        }
162    }
163}
164MOLES3 = 'moles3'
165MOLES2 = 'moles2'
166
167MOLES3DB_SCRIPT = '/misc/frigid3/humid1/mnagni/workspaces/moles3/MolesManager/src/sqlTables.py'
168MOLES3DB = DBConnection('postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/Moles3')
169MOLES3DB.initTables(DBScript(MOLES3DB_SCRIPT))
Note: See TracBrowser for help on using the repository browser.