Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named registration.backends.default.urls

Tags:

python

django

This topic is definitely related to this topic, though, according to the approved answer and related comment the fix was to change registration.backends.default.urls to registration.urls. When I try the same the error is the same but, with registration.urls instead of registration.backends.default.urls.

P.S django.contrib.auth is added to the INSTALLED_APPS

Environment:



Request Method: GET
Request URL: http://127.0.0.1:8000/accounts/register/

Django Version: 1.4.2
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'oauth2app',
 'django.contrib.admin',
 'uni_form',
 'server')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\core\handlers\base.py" in get_response
  101.                             request.path_info)
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\core\urlresolvers.py" in resolve
  298.             for pattern in self.url_patterns:
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\core\urlresolvers.py" in url_patterns
  328.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\core\urlresolvers.py" in urlconf_module
  323.             self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\utils\importlib.py" in import_module
  35.     __import__(name)
File "C:\Users\Roel\workspace\ts-server\tsserver\tsserver\urls.py" in <module>
  19.     (r'^accounts/', include('registration.backends.default.urls')),
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\conf\urls\__init__.py" in include
  24.         urlconf_module = import_module(urlconf_module)
File "C:\Python27\lib\site-packages\django-1.4.2-py2.7.egg\django\utils\importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /accounts/register/
Exception Value: No module named registration.backends.default.urls
like image 627
Roel Veldhuizen Avatar asked Oct 07 '22 02:10

Roel Veldhuizen


1 Answers

I had to install django-registration first (seems only logical :-s)

pip install django-registration

like image 60
Roel Veldhuizen Avatar answered Oct 10 '22 02:10

Roel Veldhuizen