Django

Code

Ticket #893 (closed: fixed)

Opened 3 years ago

Last modified 1 year ago

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

Reported by: wangbin@gmail.com Assigned to: adrian
Milestone: Component: django.contrib.admin
Version: Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 1
Needs tests: 1 Patch needs improvement: 1

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

admin-templates.diff (2.3 kB) - added by deric <deric@monowerks.com> on 11/28/05 01:56:30.
admin-templates2.diff (1.3 kB) - added by deric <deric@monowerks.com> on 11/29/05 03:12:03.
svn diff delete_confirmation.html object_history.html

Change History

11/28/05 00:53:36 changed by deric <deric@monowerks.com>

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

11/28/05 01:14:50 changed by lawgon@thenilgiris.com

  • severity changed from normal to major.

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

11/28/05 01:43:23 changed by lawgon@thenilgiris.com

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

11/28/05 01:56:30 changed by deric <deric@monowerks.com>

  • attachment admin-templates.diff added.

11/28/05 01:58:38 changed by deric <deric@monowerks.com>

  • severity changed from major to normal.

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...

11/29/05 03:12:03 changed by deric <deric@monowerks.com>

  • attachment admin-templates2.diff added.

svn diff delete_confirmation.html object_history.html

11/29/05 03:23:07 changed by deric <deric@monowerks.com>

the diffs are collectively inclusive. merge both.

12/01/05 00:52:20 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #893 ("change password" and "log out" on admin site doesn't work on apache2)




Change Properties
Action