summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhusudan.C.S2011-01-18 22:17:05 +0530
committerMadhusudan.C.S2011-01-18 22:17:05 +0530
commit3951c63235cc0ffe435418f6fe768987cf63e824 (patch)
tree9635b0cb59d55bb23fed9a8c1b8d3b8ff74ae0ae
parent20f5d060164c8f187448243f847d3586872ffde4 (diff)
downloadpytask-3951c63235cc0ffe435418f6fe768987cf63e824.tar.gz
pytask-3951c63235cc0ffe435418f6fe768987cf63e824.tar.bz2
pytask-3951c63235cc0ffe435418f6fe768987cf63e824.zip
Move the regbackend import to urls.py.
-rwxr-xr-xpytask/profile/models.py9
-rwxr-xr-xpytask/urls.py11
2 files changed, 11 insertions, 9 deletions
diff --git a/pytask/profile/models.py b/pytask/profile/models.py
index 3741c30..451dfc6 100755
--- a/pytask/profile/models.py
+++ b/pytask/profile/models.py
@@ -103,12 +103,3 @@ class RoleRequest(models.Model):
is_read = models.BooleanField(default = False)
is_deleted = models.BooleanField(default = False)
-
-
-# This import is not used anywhere else, but is very important to register
-# the user registered signal receiver. So please don't remove it. Although
-# it against style to put any imports in the end of the file, this is
-# intentional so that this import may not be removed accidentally when
-# cleaning up other unused imports.
-# Although this import is not directly used in this f
-import pytask.profile.regbackend
diff --git a/pytask/urls.py b/pytask/urls.py
index d00ae4e..277db21 100755
--- a/pytask/urls.py
+++ b/pytask/urls.py
@@ -6,6 +6,17 @@ from registration.views import register
from pytask.profile.forms import CustomRegistrationForm
+# This import is not used anywhere else, but is very important to register
+# the user registered signal receiver. So please don't remove it. Although
+# it against style to put any imports in the end of the file, this is
+# intentional so that this import may not be removed accidentally when
+# cleaning up other unused imports.
+# Although this import is not directly used in this module, but it is
+# imported here so that it executes the code which connects the
+# user_registered signal sent by the django-registration app. Also, to
+# avoid cyclic imports, there is no better place than here.
+import pytask.profile.regbackend
+
admin.autodiscover()