diff forums/management/commands/topic_export.py @ 680:91de9b15b410

For Django 1.5.2: select_related's depth argument is deprecated.
author Brian Neal <bgneal@gmail.com>
date Thu, 15 Aug 2013 20:35:02 -0500
parents 2a4e2e86c65e
children 4aadaf3bc234
line wrap: on
line diff
--- a/forums/management/commands/topic_export.py	Thu Aug 15 20:14:33 2013 -0500
+++ b/forums/management/commands/topic_export.py	Thu Aug 15 20:35:02 2013 -0500
@@ -48,7 +48,7 @@
         except Topic.DoesNotExist:
             raise CommandError('topic ID does not exist')
 
-        posts = topic.posts.select_related(depth=1)
+        posts = topic.posts.select_related('user')
 
         try:
             content = render_to_string(template_name, {'topic': topic, 'posts':