cannot login to admin site with superuser

1,748 views
Skip to first unread message

xpanta

unread,
Dec 31, 2010, 11:38:53 AM12/31/10
to Django users
Hi,

It seems that for some reason I can't login to admin site or my
webpage using the admin user. I even created a new superuser with
manage.py createsuperuser using plain numbers as my password ('123').
So it is not a password issue.

However when I try to django-admin validate I get an import error like
this:

Error: Could not import settings 'myproject.settings' (Is it on
sys.path? Does it have syntax errors?): No module named
myproject.settings

c:\workspace\myproject is on my sys.path. I also did a
sys.path.append() c:\workspace but I still get the same error.

I also tried this:

http://coderseye.com/2007/howto-reset-the-admin-password-in-django.html

but still I can't login.

Admin user cannot login to the myproject web page. Other users can. I
use a postgresql database. I used to have a mysql db but I switched to
postgresql. Don't know if that matters.

I also use django 1.2.1 on windows 7.

Any help would be appreciated. I have tried hard and now I am
completely lost.

xpanta

unread,
Jan 4, 2011, 4:15:25 AM1/4/11
to Django users
is there any hope for me?

Shawn Milochik

unread,
Jan 4, 2011, 12:06:18 PM1/4/11
to django...@googlegroups.com

On Jan 4, 2011, at 4:15 AM, xpanta wrote:

> is there any hope for me?

Does your settings.py file do any imports? If there is a problem with an import you'll have a major disaster and the cause may not be obvious from the error message.

Shawn

xpanta

unread,
Jan 4, 2011, 2:15:30 PM1/4/11
to Django users
Thanks,

These are my only imports:

import os.path
import logging

And this is my INSTALLED_APPS section

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'myproject.main',
)

Shawn Milochik

unread,
Jan 4, 2011, 3:05:05 PM1/4/11
to django...@googlegroups.com
What happens when you try 'manage.py shell'?

Shawn

xpanta

unread,
Jan 4, 2011, 10:53:51 PM1/4/11
to Django users
python manage.py shell works normally. It gives me the interactive
console
Reply all
Reply to author
Forward
0 new messages