I Want to Build Your Website


Follow me here and let me show you what I can do!

Django Admin Is Broken


So I was doing some work with the latest version of Django and found a little error that was pretty simple to fix. When I started the admin for the teeshirtnut.com site, I noticed that the "Change Password", and "Log Out", links were broken. Basically what was happening, was that admin was getting two "admins" in the link.

So that problem was pretty easy to solve. All I had to do was open up "contrib/admin/sites.py" and change line 46 from ""self.root_path = 'admin/'" to ""self.root_path = '/admin/'", basically adding that beginning slash. After saving that change and restarting apache, I was able to logout successfully from anywhere in the admin. Pretty good stuff, however, I changed that file inside the trunk, so upon the next update it could be broken again.

After doing a little more digging I see that this issue was logged as bug 10061. So when it's fixed in this bug report all should be well. But right now, if your having this problem, this is fix. Just watch when you do an update.

| More



Comments


No Response Yet

Why don't YOU kick it off by saying something ↓

Comment Form

Content is licensed under a Creative Commons Public Domain License