Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored September 14, 2007

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/admin/sites.py
4  django/contrib/admin/sites.py
@@ -123,6 +123,10 @@ def root(self, request, url):
123 123
             return self.password_change_done(request)
124 124
         elif url == 'jsi18n':
125 125
             return self.i18n_javascript(request)
  126
+        # urls starting with 'r/' are for the "show in web" links
  127
+        elif url.startswith('r/'):
  128
+            from django.views.defaults import shortcut
  129
+            return shortcut(request, *url.split('/')[1:])
126 130
         else:
127 131
             match = USER_CHANGE_PASSWORD_URL_RE.match(url)
128 132
             if match:

0 notes on commit 337f198

Please sign in to comment.
Something went wrong with that request. Please try again.