Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

newforms-admin: Fixed #5251 -- 'Show in Web' links now work properly …

…again. Thanks, Florian Apolloner

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 337f19828f1d3dc480464409ff0bdc1190abc1ac 1 parent d5ed482
@adrianholovaty adrianholovaty authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/contrib/admin/sites.py
View
4 django/contrib/admin/sites.py
@@ -123,6 +123,10 @@ def root(self, request, url):
return self.password_change_done(request)
elif url == 'jsi18n':
return self.i18n_javascript(request)
+ # urls starting with 'r/' are for the "show in web" links
+ elif url.startswith('r/'):
+ from django.views.defaults import shortcut
+ return shortcut(request, *url.split('/')[1:])
else:
match = USER_CHANGE_PASSWORD_URL_RE.match(url)
if match:
Please sign in to comment.
Something went wrong with that request. Please try again.