Error: No module named admindjango.contrib.auth

1,192 views
Skip to first unread message

Harry

unread,
Nov 10, 2010, 12:39:01 PM11/10/10
to Django users
Trying to follow Part 2 of the Django documentation

>>> python manage.py syncdb throws this when configuring admin
'Error: No module named admindjango.contrib.auth'
More errors if I try to include admin docs.

1) Need to know where I can see which modules are installed
2) Why this module did not install
3) How to fix it.

Mac OS X 10.6.4
django-admin.py --version = 1.1 SVN-13865
python --version = Python 2.6.1

4) Should I upgrade Python, and what will this break?

Thanks
Harry

Łukasz Rekucki

unread,
Nov 10, 2010, 2:34:26 PM11/10/10
to django...@googlegroups.com
On 10 November 2010 18:39, Harry <hama...@gmail.com> wrote:
> Trying to follow Part 2 of the Django documentation
>
>>>> python manage.py syncdb throws this when configuring admin
> 'Error: No module named admindjango.contrib.auth'
> More errors if I try to include admin docs.
>
> 1) Need to know where I can see which modules are installed
If you have "pip" you can call "pip freeze" to see all installed
python packages. This doesn't show modules inside that packages, but
it's a good overwiew of what you have.

> 2) Why this module did not install

Because a module with that name doesn't exists.

> 3) How to fix it.

Check your INSTALLED_APPS settings. It should look something like this:

INSTALLED_APPS = (
'django.contrib.admin', <--- notice the coma
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'polls'
)

If you forget the comma Python will join the two literal strings.

('django.contrib.admin'
'django.contrib.auth',)

Is the same for Python as:

('django.contrib.admindjango.contrib.auth',)

And that's not a valid application. At least that's my best guess
about your problem.


--
Łukasz Rekucki

Reply all
Reply to author
Forward
0 new messages