Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/gpp/settings.py Wed Feb 02 20:37:17 2011 +0000 +++ b/gpp/settings.py Sat Feb 05 21:46:52 2011 +0000 @@ -83,7 +83,7 @@ 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', - #'debug_toolbar.middleware.DebugToolbarMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'gpp.core.middleware.InactiveUserMiddleware', 'gpp.core.middleware.WhosOnline', @@ -159,8 +159,8 @@ 'smiley', 'weblinks', ] -#if DEBUG: -# INSTALLED_APPS.append('debug_toolbar') +if DEBUG: + INSTALLED_APPS.append('debug_toolbar') LOGIN_URL = '/accounts/login/' LOGIN_REDIRECT_URL = '/profile/me/'