diff options
-rwxr-xr-x | pytask/profile/models.py | 9 | ||||
-rwxr-xr-x | pytask/urls.py | 11 |
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() |