diff core/tasks.py @ 681:53a56d19568c

For Django 1.5.2; cleanup command is now called clearsessions.
author Brian Neal <bgneal@gmail.com>
date Fri, 16 Aug 2013 20:43:39 -0500
parents ee87ea74d46b
children aeafbf3ecebf
line wrap: on
line diff
--- a/core/tasks.py	Thu Aug 15 20:35:02 2013 -0500
+++ b/core/tasks.py	Fri Aug 16 20:43:39 2013 -0500
@@ -37,17 +37,17 @@
     # import problems when running on the production server (Python 2.5 and
     # mod_wsgi). Moving them here worked around that problem.
 
-    from django.core.management.commands.cleanup import Command as CleanupCommand
-    from forums.management.commands.forum_cleanup import Command as ForumCleanup
+    from django.contrib.sessions.management.commands import clearsessions
+    from forums.management.commands import forum_cleanup
 
-    # Execute Django's cleanup command (deletes old sessions).
+    # Cleanup old sessions
 
-    command = CleanupCommand()
+    command = clearsessions.Command()
     command.execute()
 
     # Execute our forum cleanup command to delete old last visit records.
 
-    command = ForumCleanup()
+    command = forum_cleanup.Command()
     command.execute()