Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#893 closed defect (fixed)

"change password" and "log out" on admin site doesn't work on apache2

Reported by: wangbin@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: UI/UX:

Description

When I setup a django project with apache2 and mod_python, the "change password" and "log out" on admin site doesn't work, I think the link in base.html should not be "/admin/password_change/", it should be "password_change/".

Attachments (2)

admin-templates.diff (2.3 KB) - added by deric <deric@…> 11 years ago.
admin-templates2.diff (1.3 KB) - added by deric <deric@…> 11 years ago.
svn diff delete_confirmation.html object_history.html

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by deric <deric@…>

works for me apache2/mod_python revision 1474

[28/Nov/2005 00:52:04] "GET /admin/password_change/ HTTP/1.1" 200 2089
[28/Nov/2005 00:52:14] "POST /admin/password_change/ HTTP/1.1" 302 0
[28/Nov/2005 00:52:14] "GET /admin/password_change/done/ HTTP/1.1" 200 1256
[28/Nov/2005 00:52:19] "GET /admin/logout/ HTTP/1.1" 302 0
[28/Nov/2005 00:52:19] "GET /admin/logout/ HTTP/1.1" 200 1087

comment:2 Changed 11 years ago by lawgon@…

Severity: normalmajor

my site admin is in:
http://mydomain.com/myproject/admin/
on clicking 'logout' the browser goes to:
http://mydomain.com/admin/logout/ and not to:
http://mydomain.com/myproject/admin/logout/ as it was doing earlier

comment:3 Changed 11 years ago by lawgon@…

on discussion in IRC it is found that this error is there for sites that do not have admin on '/'. Where admin is on '/' it works

Changed 11 years ago by deric <deric@…>

Attachment: admin-templates.diff added

comment:4 Changed 11 years ago by deric <deric@…>

Severity: majornormal

As explained above this has been identified to possibly be due to absolute URLs for the links in the admin interface. Presumably relative URLs would work fine since you'd be in the admin app whatever URL that might be at. I've attached a patch for the basic change-templates. I'm not sure if this will work for all the templates. I'm in a bit of a hurry... will look into it later unless someone else steps up...

Changed 11 years ago by deric <deric@…>

Attachment: admin-templates2.diff added

svn diff delete_confirmation.html object_history.html

comment:5 Changed 11 years ago by deric <deric@…>

the diffs are collectively inclusive. merge both.

comment:6 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [1521]) Fixed #893 -- Admin 'change password' and 'log out' links no longer assume admin lives at '/admin/'. Thanks, deric@…

Note: See TracTickets for help on using tickets.
Back to Top