Using the Django Admin to change a password.

2,348 views
Skip to first unread message

James Hancock

unread,
Nov 20, 2010, 4:44:49 AM11/20/10
to django...@googlegroups.com
I have a strange problem and don't really know where to start looking to fix it. Can someone point me in the right direction to figure this one out.


In the Admin interface when I try to use the  "change password form" on any of my users it gives me a

"Page not found (404)
Request Method:    GET
Request URL:    http://goeigo.org/admin/auth/user/21/password/
user object with primary key u'21/password' does not exist.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
"
error......

I can change the passwords from the terminal and create users and stuff, but the admin page doesn't seem to work.

Any hints?

Cheers,
James Hancock

P.S. I love django

Martin Melin

unread,
Nov 20, 2010, 5:54:56 AM11/20/10
to django...@googlegroups.com

I assume that the rest of the admin is working?

What version of Django are you using?

Have you done anything out of the ordinary in urls.py?

The problem seems to be that there is no URL pattern for the password
change form, which means the user edit URL pattern will match instead,
or that the pattern for password change comes after a broader pattern.

Regards,
Martin Melin

derek

unread,
Dec 13, 2010, 8:55:23 AM12/13/10
to Django users
I've been getting the same error.

There are a number of tickets that have been posted about this, most
of which were closed, the reason been given that they are duplicates
of:
http://code.djangoproject.com/ticket/3011
which has been open for four (4!) years.

http://code.djangoproject.com/ticket/9656
also purports to deal with this and gives some suggested code which
may work.

I'd really welcome an authoritative, working solution for this.

On Nov 20, 12:54 pm, Martin Melin <mme...@gmail.com> wrote:

Aaron Fay

unread,
May 6, 2011, 12:06:36 PM5/6/11
to django...@googlegroups.com
I was getting this error also, the tickets suggested I had a custom User proxy model or something, when in fact I didn't.  What I _had_ done was commented out the admin.autodiscover() in my urls and manually registered the django.contrib.auth.models.User model manually.

Using admin.autodiscover() seems to have fixed my problem.

Cheers,
Aaron
Reply all
Reply to author
Forward
0 new messages