Move the regbackend import to urls.py.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Tue, 18 Jan 2011 22:17:05 +0530
changeset 472 f9011a1dfe1c
parent 471 4929cb6a6a9e
child 473 50484b901aad
Move the regbackend import to urls.py.
pytask/profile/models.py
pytask/urls.py
--- a/pytask/profile/models.py	Tue Jan 18 22:02:35 2011 +0530
+++ b/pytask/profile/models.py	Tue Jan 18 22:17:05 2011 +0530
@@ -103,12 +103,3 @@
     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
--- a/pytask/urls.py	Tue Jan 18 22:02:35 2011 +0530
+++ b/pytask/urls.py	Tue Jan 18 22:17:05 2011 +0530
@@ -6,6 +6,17 @@
 
 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()