Mercurial > public > sg101
comparison gpp/settings.py @ 180:aef00df91165
Implement #63, add a queued email facility.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 21 Mar 2010 20:33:33 +0000 |
parents | d51743322bb2 |
children | 500e5875a306 |
comparison
equal
deleted
inserted
replaced
179:70b2e307c866 | 180:aef00df91165 |
---|---|
115 'donations', | 115 'donations', |
116 'downloads', | 116 'downloads', |
117 'forums', | 117 'forums', |
118 'gcalendar', | 118 'gcalendar', |
119 'irc', | 119 'irc', |
120 'mailer', | |
120 'membermap', | 121 'membermap', |
121 'messages', | 122 'messages', |
122 'news', | 123 'news', |
123 'podcast', | 124 'podcast', |
124 'polls', | 125 'polls', |
139 # Messages | 140 # Messages |
140 ####################################################################### | 141 ####################################################################### |
141 MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' | 142 MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' |
142 | 143 |
143 ####################################################################### | 144 ####################################################################### |
145 # Email | |
146 ####################################################################### | |
147 EMAIL_HOST = local_settings.EMAIL_HOST | |
148 EMAIL_PORT = local_settings.EMAIL_PORT | |
149 | |
150 ####################################################################### | |
144 # Caching | 151 # Caching |
145 ####################################################################### | 152 ####################################################################### |
146 if local_settings.USE_CACHE: | 153 if local_settings.USE_CACHE: |
147 CACHE_BACKEND = local_settings.CACHE_BACKEND | 154 CACHE_BACKEND = local_settings.CACHE_BACKEND |
148 #CACHE_MIDDLEWARE_SECONDS = local_settings.CACHE_MIDDLEWARE_SECONDS | 155 #CACHE_MIDDLEWARE_SECONDS = local_settings.CACHE_MIDDLEWARE_SECONDS |
157 | 164 |
158 ####################################################################### | 165 ####################################################################### |
159 # GPP Specific Settings | 166 # GPP Specific Settings |
160 ####################################################################### | 167 ####################################################################### |
161 GPP_LOG_LEVEL = 0 | 168 GPP_LOG_LEVEL = 0 |
162 GPP_SEND_EMAIL = local_settings.GPP_SEND_EMAIL | 169 GPP_SEND_EMAIL = local_settings.GPP_SEND_EMAIL # see MAILER_ENQUEUE_MAIL |
163 GPP_NO_REPLY_EMAIL = 'no_reply' | 170 GPP_NO_REPLY_EMAIL = 'no_reply' |
164 AVATAR_DIR = 'avatars' | 171 AVATAR_DIR = 'avatars' |
165 MAX_AVATAR_SIZE_BYTES = 2 * 1024 * 1024 | 172 MAX_AVATAR_SIZE_BYTES = 2 * 1024 * 1024 |
166 MAX_AVATAR_SIZE_PIXELS = 100 | 173 MAX_AVATAR_SIZE_PIXELS = 100 |
167 AVATAR_DEFAULT_URL = MEDIA_URL + AVATAR_DIR + '/default.png' | 174 AVATAR_DEFAULT_URL = MEDIA_URL + AVATAR_DIR + '/default.png' |
174 DONATIONS_GOAL = Decimal('100.00') # monthly goal | 181 DONATIONS_GOAL = Decimal('100.00') # monthly goal |
175 DONATIONS_ANON_NAME = u'Anonymous' | 182 DONATIONS_ANON_NAME = u'Anonymous' |
176 DONATIONS_ITEM_NUM = '500' # donation w/name listed | 183 DONATIONS_ITEM_NUM = '500' # donation w/name listed |
177 DONATIONS_ITEM_ANON_NUM = '501' # donation listed as anonymous | 184 DONATIONS_ITEM_ANON_NUM = '501' # donation listed as anonymous |
178 | 185 |
186 # If MAILER_ENQUEUE_MAIL is True, all emails will be stored in the | |
187 # mailer application's mail queue (database table). It is then expected | |
188 # that a daemon or cron job will actually send the mail out. If | |
189 # MAILER_ENQUEUE_MAIL is False, then email will only be sent if | |
190 # the setting GPP_SEND_EMAIL (above) is True. In any event, emails | |
191 # will be logged via the Python logger if the Python logger filter | |
192 # DEBUG is active. | |
193 | |
194 MAILER_ENQUEUE_MAIL = True | |
195 | |
179 ####################################################################### | 196 ####################################################################### |
180 # Configure Logging | 197 # Configure Logging |
181 ####################################################################### | 198 ####################################################################### |
182 | 199 |
183 logging.basicConfig( | 200 logging.basicConfig( |