Mercurial > public > sg101
comparison gpp/settings.py @ 318:c550933ff5b6
Fix a bug where you'd get an error when trying to delete a forum thread (topic does not exist). Apparently when you call topic.delete() the posts would get deleted, but the signal handler for each one would run, and it would try to update the topic's post count or something, but the topic was gone? Reworked the code a bit and explicitly delete the posts first. I also added a sync() call on the parent forum since post counts were not getting adjusted.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 Feb 2011 21:46:52 +0000 |
parents | 2934a867c2ef |
children | 0c18dfb1da1c |
comparison
equal
deleted
inserted
replaced
317:2934a867c2ef | 318:c550933ff5b6 |
---|---|
81 MIDDLEWARE_CLASSES = ( | 81 MIDDLEWARE_CLASSES = ( |
82 'django.middleware.common.CommonMiddleware', | 82 'django.middleware.common.CommonMiddleware', |
83 'django.middleware.csrf.CsrfViewMiddleware', | 83 'django.middleware.csrf.CsrfViewMiddleware', |
84 'django.contrib.sessions.middleware.SessionMiddleware', | 84 'django.contrib.sessions.middleware.SessionMiddleware', |
85 'django.contrib.messages.middleware.MessageMiddleware', | 85 'django.contrib.messages.middleware.MessageMiddleware', |
86 #'debug_toolbar.middleware.DebugToolbarMiddleware', | 86 'debug_toolbar.middleware.DebugToolbarMiddleware', |
87 'django.contrib.auth.middleware.AuthenticationMiddleware', | 87 'django.contrib.auth.middleware.AuthenticationMiddleware', |
88 'gpp.core.middleware.InactiveUserMiddleware', | 88 'gpp.core.middleware.InactiveUserMiddleware', |
89 'gpp.core.middleware.WhosOnline', | 89 'gpp.core.middleware.WhosOnline', |
90 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', | 90 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', |
91 ) | 91 ) |
157 'potd', | 157 'potd', |
158 'shoutbox', | 158 'shoutbox', |
159 'smiley', | 159 'smiley', |
160 'weblinks', | 160 'weblinks', |
161 ] | 161 ] |
162 #if DEBUG: | 162 if DEBUG: |
163 # INSTALLED_APPS.append('debug_toolbar') | 163 INSTALLED_APPS.append('debug_toolbar') |
164 | 164 |
165 LOGIN_URL = '/accounts/login/' | 165 LOGIN_URL = '/accounts/login/' |
166 LOGIN_REDIRECT_URL = '/profile/me/' | 166 LOGIN_REDIRECT_URL = '/profile/me/' |
167 LOGOUT_URL = '/accounts/logout/' | 167 LOGOUT_URL = '/accounts/logout/' |
168 | 168 |