| author | cavaliet |
| Mon, 09 Dec 2013 12:12:25 +0100 | |
| changeset 221 | 53b545f29189 |
| parent 107 | e30c9bfaf945 |
| child 275 | 7fb704ee75e7 |
| permissions | -rw-r--r-- |
| 0 | 1 |
# -*- coding: utf-8 -*- |
2 |
''' |
|
3 |
Created on May 29, 2013 |
|
4 |
||
5 |
@author: ymh |
|
6 |
''' |
|
7 |
import logging |
|
8 |
import os |
|
9 |
||
10 |
DEBUG = True |
|
11 |
TEMPLATE_DEBUG = DEBUG |
|
12 |
||
13 |
ADMINS = ( |
|
14 |
# ('Your Name', 'your_email@example.com'), |
|
15 |
) |
|
16 |
||
17 |
#BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" |
|
18 |
BASE_DIR = '%(base_dir)s' |
|
19 |
BASE_URL = '%(base_url)s' |
|
20 |
WEB_URL = '%(web_url)s' |
|
21 |
BASE_STATIC_URL = WEB_URL + BASE_URL + 'static/' |
|
22 |
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../../web/static/").rstrip("/")+"/" |
|
23 |
||
24 |
DATABASES = { |
|
25 |
'default': { |
|
26 |
'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
27 |
'NAME': '%(db_name)s', # Or path to database file if using sqlite3. |
|
28 |
'USER': '%(db_user)s', |
|
29 |
'PASSWORD': '%(db_password)s', |
|
30 |
'HOST': '%(db_host)s', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. |
|
31 |
'PORT': '%(db_port)d', # Set to empty string for default. |
|
32 |
} |
|
33 |
} |
|
34 |
||
35 |
# Hosts/domain names that are valid for this site; required if DEBUG is False |
|
36 |
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts |
|
37 |
ALLOWED_HOSTS = [] |
|
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 |
# In a Windows environment this must be set to your system time zone. |
|
43 |
TIME_ZONE = 'America/Chicago' |
|
44 |
||
45 |
# Language code for this installation. All choices can be found here: |
|
46 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
|
47 |
LANGUAGE_CODE = 'en-us' |
|
48 |
||
49 |
SITE_ID = 1 |
|
50 |
||
51 |
# If you set this to False, Django will make some optimizations so as not |
|
52 |
# to load the internationalization machinery. |
|
53 |
USE_I18N = True |
|
54 |
||
55 |
# If you set this to False, Django will not format dates, numbers and |
|
56 |
# calendars according to the current locale. |
|
57 |
USE_L10N = True |
|
58 |
||
59 |
# If you set this to False, Django will not use timezone-aware datetimes. |
|
60 |
USE_TZ = True |
|
61 |
||
62 |
# Absolute filesystem path to the directory that will hold user-uploaded files. |
|
63 |
# Example: "/var/www/example.com/media/" |
|
64 |
MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
|
65 |
||
66 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
67 |
# trailing slash. |
|
68 |
# Examples: "http://example.com/media/", "http://media.example.com/" |
|
69 |
MEDIA_URL = BASE_STATIC_URL + "media/" |
|
70 |
||
71 |
# Absolute path to the directory static files should be collected to. |
|
72 |
# Don't put anything in this directory yourself; store your static files |
|
73 |
# in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
74 |
# Example: "/var/www/example.com/static/" |
|
75 |
STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
76 |
||
77 |
# URL prefix for static files. |
|
78 |
# Example: "http://example.com/static/", "http://static.example.com/" |
|
79 |
STATIC_URL = BASE_STATIC_URL + 'site/' |
|
80 |
||
81 |
# Make this unique, and don't share it with anybody. |
|
82 |
SECRET_KEY = '%(secret_key)s' |
|
83 |
||
84 |
#LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../../run/log/log.txt")) |
|
85 |
LOG_FILE = '%(log_file)s' |
|
86 |
LOG_LEVEL = logging.DEBUG |
|
87 |
||
88 |
LOGGING = { |
|
89 |
'version': 1, |
|
90 |
'disable_existing_loggers': False, |
|
91 |
'filters': { |
|
92 |
'require_debug_false': { |
|
93 |
'()': 'django.utils.log.RequireDebugFalse' |
|
94 |
} |
|
95 |
}, |
|
96 |
'formatters' : { |
|
97 |
'simple' : { |
|
98 |
'format': "%(asctime)s - %(levelname)s : %(message)s", |
|
99 |
}, |
|
100 |
'semi-verbose': { |
|
101 |
'format': '%(levelname)s %(asctime)s %(module)s %(message)s' |
|
102 |
}, |
|
103 |
}, |
|
104 |
'handlers': { |
|
105 |
'stream_to_console': { |
|
106 |
'level': LOG_LEVEL, |
|
107 |
'class': 'logging.StreamHandler' |
|
108 |
}, |
|
109 |
'file': { |
|
110 |
'level': LOG_LEVEL, |
|
111 |
'class': 'logging.FileHandler', |
|
112 |
'filename': LOG_FILE, |
|
113 |
'formatter': 'semi-verbose', |
|
114 |
}, |
|
115 |
}, |
|
116 |
'loggers': { |
|
117 |
'django.request': { |
|
118 |
'handlers': ['file'], |
|
119 |
'level': 'ERROR', |
|
120 |
'propagate': True, |
|
121 |
}, |
|
122 |
'jocondelab': { |
|
123 |
'handlers': ['file'], |
|
124 |
'level': 'DEBUG', |
|
125 |
'propagate': True, |
|
126 |
}, |
|
127 |
'core': { |
|
128 |
'handlers': ['file'], |
|
129 |
'level': 'DEBUG', |
|
130 |
'propagate': True, |
|
131 |
}, |
|
132 |
'rdflib_sqlalchemy': { |
|
133 |
'handlers': ['file'], |
|
134 |
'level': 'DEBUG', |
|
135 |
'propagate': True, |
|
136 |
}, |
|
|
107
e30c9bfaf945
update django and small settings changes
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
137 |
'rdflib.term': { |
|
e30c9bfaf945
update django and small settings changes
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
138 |
'handlers': ['file'], |
|
e30c9bfaf945
update django and small settings changes
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
139 |
'level': 'DEBUG', |
|
e30c9bfaf945
update django and small settings changes
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
140 |
'propagate': True, |
|
e30c9bfaf945
update django and small settings changes
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
141 |
}, |
|
e30c9bfaf945
update django and small settings changes
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
142 |
|
| 0 | 143 |
} |
144 |
} |
|
145 |