I tried deleting auth_user in order to force manage.py to create a new one and see what happens (just in case there was some problem with the database table)
I gave a manage.py syncdb (after deleting auth_user) and it created the table. It also asked me to create a new superuser. I gave the details and this is what happened. (hope the following give a clue of what is going on) http://dpaste.com/hold/397353/ This is my settings.py http://dpaste.com/hold/397354/ and this is my CustomUserModel implementation http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ On 8 Φεβ, 08:54, xpanta <[email protected]> wrote: > I have tried this already. I still can't login. > > :-( > > On 7 Φεβ, 15:48, Chris Lawlor <[email protected]> wrote: > > > Try running 'python manage.py createsuperuser' on your production > > server to create a new superuser account. You should have full > > privileges to log in to the admin and make changes using this account. > > > On Feb 7, 8:15 am, xpanta <[email protected]> wrote: > > > > Hi, > > > > it seems that my problem is a bit complicated. I have tried much but > > > to no avail. So, please help me! > > > > Some time ago I migrated to postgresql from mysql. I don't know if I > > > did something wrong. Anyway, my webapp works "almost" flawlessly. > > > > Since then I never needed to login using admin rights (either using > > > the admin panel or my web site). Some weeks ago I tried and I noticed > > > that I can't login (to both admin site and web page) using admin > > > credentials. > > > > I have tried dozens of various tricks but I still can't login. > > > > I tried adding user.set_password() to my views.py in order to replace > > > admin password with a new simpler one ('123') but nothing. I even > > > registered a new user from my web page and changed its fields directly > > > in the DB (is_staff, is_active, is_superuser) to 'True'. This let me > > > login to the admin site but gave me no permission to change anything. > > > I even tried to create various admin users with the help of django > > > shell but none of them gives me a login. Interestingly whenever I do > > > something to change admin password, I always see a different hashed > > > password value in my DB. This means that all my approaches succeed in > > > changing the admin password. However I can't login. > > > > Normal users work fine. Problem appears only when the user is an > > > administrator. > > > > Any help would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

