summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorshoward <showard@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-14 21:41:51 +0000
committershoward <showard@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-14 21:41:51 +0000
commit21450edffa9d97befc86be60c06f8610e69327d4 (patch)
treeacab6d2ab2a409b8a9b59f143a9dfbd1a6685353 /frontend
parent0c77ed95fb714feaaf4321dd249c15e188180ac0 (diff)
Fix creation of "Basic Admin" group, at long last.
Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2652 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'frontend')
-rw-r--r--frontend/afe/management.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/frontend/afe/management.py b/frontend/afe/management.py
index ed71a9b9..bb0c5698 100644
--- a/frontend/afe/management.py
+++ b/frontend/afe/management.py
@@ -3,8 +3,14 @@
from django.dispatch import dispatcher
from django.db.models import signals
from django.contrib import auth
-import common
-from autotest_lib.frontend.afe import models
+# 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
+# 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
+# connection won't work and the dispatcher will simply never call the method.
+from frontend.afe import models
BASIC_ADMIN = 'Basic admin'