|
1 # -*- coding: utf-8 -*- |
|
2 from . import * |
|
3 import os, logging |
|
4 |
|
5 #TODO override |
|
6 DEBUG = True |
|
7 TEMPLATE_DEBUG = DEBUG |
|
8 |
|
9 |
|
10 BASE_URL = '%(base_url)s' |
|
11 WEB_URL = '%(web_url)s' |
|
12 |
|
13 PLATFORM_BASE_URL = WEB_URL + BASE_URL + 'ammico/' |
|
14 |
|
15 STREAM_SRC_PREFIX = "" |
|
16 |
|
17 BASE_STATIC_URL = WEB_URL + BASE_URL + 'static/' |
|
18 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../../web/static/").rstrip("/")+"/" |
|
19 |
|
20 |
|
21 # Absolute path to the directory that holds media. |
|
22 # Example: "/home/media/media.lawrence.com/" |
|
23 MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
|
24 |
|
25 # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
26 # trailing slash if there is a path component (optional in other cases). |
|
27 # Examples: "http://media.lawrence.com", "http://example.com/media/" |
|
28 MEDIA_URL = BASE_STATIC_URL + 'media/' |
|
29 |
|
30 |
|
31 STATIC_URL = BASE_STATIC_URL + 'site/' |
|
32 |
|
33 # Absolute path to the directory that static files (js, css, swf...) |
|
34 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder |
|
35 STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
36 |
|
37 |
|
38 SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/' |
|
39 |
|
40 |
|
41 # Make this unique, and don't share it with anybody. |
|
42 SECRET_KEY = '%(secret_key)s' |
|
43 |
|
44 DATABASES = { |
|
45 'default': { |
|
46 'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
47 'NAME': '%(db_name)s', # Or path to database file if using sqlite3. |
|
48 'USER': '%(db_user)s', # Not used with sqlite3. |
|
49 'PASSWORD': '%(db_password)s', # Not used with sqlite3. |
|
50 'HOST': '%(db_host)s', # Set to empty string for localhost. Not used with sqlite3. |
|
51 'PORT': '%(db_port)d', # Set to empty string for default. Not used with sqlite3. |
|
52 }, |
|
53 } |
|
54 |
|
55 LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../run/log/log.txt")) |
|
56 LOG_LEVEL = logging.DEBUG |
|
57 |
|
58 LOGGING = { |
|
59 'version': 1, |
|
60 'disable_existing_loggers': False, |
|
61 'filters': { |
|
62 'require_debug_false': { |
|
63 '()': 'django.utils.log.RequireDebugFalse' |
|
64 } |
|
65 }, |
|
66 'formatters' : { |
|
67 'simple' : { |
|
68 'format': "%(asctime)s - %(levelname)s : %(message)s", |
|
69 }, |
|
70 'semi-verbose': { |
|
71 'format': '%(levelname)s %(asctime)s %(module)s %(message)s' |
|
72 }, |
|
73 }, |
|
74 'handlers': { |
|
75 'mail_admins': { |
|
76 'level': 'ERROR', |
|
77 'filters': ['require_debug_false'], |
|
78 'class': 'django.utils.log.AdminEmailHandler' |
|
79 }, |
|
80 'stream_to_console': { |
|
81 'level': LOG_LEVEL, |
|
82 'class': 'logging.StreamHandler' |
|
83 }, |
|
84 'file': { |
|
85 'level': LOG_LEVEL, |
|
86 'class': 'logging.FileHandler', |
|
87 'filename': LOG_FILE, |
|
88 'formatter': 'semi-verbose', |
|
89 }, |
|
90 }, |
|
91 'loggers': { |
|
92 # 'django.db.backends':{ |
|
93 # 'handlers': ['file'], |
|
94 # 'level': LOG_LEVEL, |
|
95 # 'propagate': True, |
|
96 # }, |
|
97 'django.request': { |
|
98 'handlers': ['file'], |
|
99 'level': LOG_LEVEL, |
|
100 'propagate': True, |
|
101 }, |
|
102 'ammico': { |
|
103 'handlers': ['file'], |
|
104 'level': LOG_LEVEL, |
|
105 'propagate': True, |
|
106 }, |
|
107 } |
|
108 } |
|
109 |
|
110 |
|
111 ADMINS = ( |
|
112 #('Your Name', 'your_email@domain.com'), |
|
113 ) |
|
114 |
|
115 MANAGERS = ADMINS |
|
116 |
|
117 AUTH_JAMESPOT = '' |
|
118 |
|
119 URL_JAMESPOT = '' |
|
120 URL_EXALEAD = '' |
|
121 URL_ORPHEO = '' |