Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named 'django.contrib.sitesallauth' in django-allauth

I am using Django 1.7 with python 3.4. I am trying to use django-allauth for user authentication and I am following this link http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/ But I am getting this problem when trying to migrate the app.

Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\django\apps\config.py", line 118, in creat
e
    cls = getattr(mod, cls_name)
AttributeError: 'module' object has no attribute 'sitesallauth'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
385, in execute_from_command_line
    utility.execute()
  File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
354, in execute
    django.setup()
  File "C:\Python34\lib\site-packages\django\__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Python34\lib\site-packages\django\apps\registry.py", line 85, in popu
late
    app_config = AppConfig.create(entry)
  File "C:\Python34\lib\site-packages\django\apps\config.py", line 123, in creat
e
    import_module(entry)
  File "C:\Python34\lib\importlib\__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named 'django.contrib.sitesallauth'

What can be the possible reason and solution to the problem.

like image 529
Rohit Avatar asked May 16 '15 12:05

Rohit


2 Answers

You're missing a comma after the "django.contrib.sites" entry in INSTALLED_APPS.

like image 55
Daniel Roseman Avatar answered Oct 19 '22 17:10

Daniel Roseman


Seems like you forgot to add the comma between the django.contrib.sites and allauth app.

like image 30
catavaran Avatar answered Oct 19 '22 19:10

catavaran