comparison gpp/settings.py @ 38:c14cfd6be87a

Added basic logging to settings.py. The send_email function is now logging. Removed remnants of the DebugLog model.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Jun 2009 01:33:38 +0000
parents 296b610ee507
children f21771118fb2
comparison
equal deleted inserted replaced
37:91fd31dc78fb 38:c14cfd6be87a
1 # Django settings for gpp project. 1 # Django settings for gpp project.
2 2
3 import os 3 import os
4 import platform 4 import platform
5 from decimal import Decimal
6 import logging
7
5 import local_settings 8 import local_settings
6 from decimal import Decimal
7 9
8 project_path = os.path.abspath(os.path.split(__file__)[0]) 10 project_path = os.path.abspath(os.path.split(__file__)[0])
9 11
10 DEBUG = local_settings.DEBUG 12 DEBUG = local_settings.DEBUG
11 TEMPLATE_DEBUG = DEBUG 13 TEMPLATE_DEBUG = DEBUG
155 DONATIONS_GOAL = Decimal('100.00') # montly goal 157 DONATIONS_GOAL = Decimal('100.00') # montly goal
156 DONATIONS_ANON_NAME = u'Anonymous' 158 DONATIONS_ANON_NAME = u'Anonymous'
157 DONATIONS_ITEM_NUM = 500 # donation w/name listed 159 DONATIONS_ITEM_NUM = 500 # donation w/name listed
158 DONATIONS_ITEM_ANON_NUM = 501 # donation listed as anonymous 160 DONATIONS_ITEM_ANON_NUM = 501 # donation listed as anonymous
159 161
162 #######################################################################
163 # Configure Logging
164 #######################################################################
165
166 logging.basicConfig(
167 filename=os.path.join(project_path, 'logs', 'gpp.log'),
168 filemode='a',
169 format='%(asctime)s %(levelname)s %(message)s',
170 level=local_settings.LOG_LEVEL)
171
172
173 #######################################################################
160 # URL's of 3rd party Javascript and CSS files. 174 # URL's of 3rd party Javascript and CSS files.
161 # These dictionaries are used by core/templatetags/script_tags, and 175 # These dictionaries are used by core/templatetags/script_tags, and
162 # should also be used by developers when creating form media classes. 176 # should also be used by developers when creating form media classes.
163 GPP_THIRD_PARTY_JS = { 177 GPP_THIRD_PARTY_JS = {
164 'jquery': ( 178 'jquery': (