Upgrade from Django 0.96 to Django 1.0.2.
Risk: high (framework change)
Visibility: medium
Signed-off-by: James Ren <jamesren@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3457 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/management.py b/frontend/afe/management.py
index 57e0855..4f6066c 100644
--- a/frontend/afe/management.py
+++ b/frontend/afe/management.py
@@ -1,11 +1,10 @@
# use some undocumented Django tricks to execute custom logic after syncdb
-from django.dispatch import dispatcher
from django.db.models import signals
from django.contrib import auth
# In this file, it is critical that we import models *just like this*. In
# particular, we *cannot* do import common; from autotest_lib... import models.
-# This is becasue when we pass the models module to dispatcher.connect(), it
+# This is because when we pass the models module to signal.connect(), it
# calls id() on the module, and the id() of a module can differ depending on how
# it was imported. For that reason, we must import models as Django does -- not
# through the autotest_lib magic set up through common.py. If you do that, the
@@ -43,5 +42,4 @@
print 'Group "%s" already exists' % BASIC_ADMIN
-dispatcher.connect(create_admin_group, sender=models,
- signal=signals.post_syncdb)
+signals.post_syncdb.connect(create_admin_group, sender=models)