# HG changeset patch # User Madhusudan.C.S # Date 1295369225 -19800 # Node ID f9011a1dfe1cd20dad66fe530736e08010a494ff # Parent 4929cb6a6a9e7f749aaf3e2a95c75c010058bc1c Move the regbackend import to urls.py. diff -r 4929cb6a6a9e -r f9011a1dfe1c pytask/profile/models.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 diff -r 4929cb6a6a9e -r f9011a1dfe1c pytask/urls.py --- 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()