Ticket #5251: show_in_web-6000.diff
File show_in_web-6000.diff, 1.5 KB (added by , 17 years ago) |
---|
-
django/contrib/admin/urls.py
2 2 3 3 urlpatterns = patterns('', 4 4 #('^$', 'django.contrib.admin.views.main.index'), 5 ('^r/(\d+)/(.*)/$', 'django.views.defaults.shortcut'),5 #('^r/(\d+)/(\d+)/$', 'django.views.defaults.shortcut'), 6 6 #('^jsi18n/$', i18n_view, {'packages': 'django.conf'}), 7 7 #('^logout/$', 'django.contrib.auth.views.logout'), 8 8 #('^password_change/$', 'django.contrib.auth.views.password_change'), -
django/contrib/admin/sites.py
15 15 LOGIN_FORM_KEY = 'this_is_the_login_form' 16 16 17 17 USER_CHANGE_PASSWORD_URL_RE = re.compile('auth/user/(\d+)/password') 18 RESOLVE_ABSOLUTE_URL_RE = re.compile('r/(\d+)/(\d+)') 18 19 19 20 class AlreadyRegistered(Exception): 20 21 pass … … 127 128 match = USER_CHANGE_PASSWORD_URL_RE.match(url) 128 129 if match: 129 130 return self.user_change_password(request, match.group(1)) 130 131 match = RESOLVE_ABSOLUTE_URL_RE.match(url) 132 if match: 133 from django.views.defaults import shortcut 134 return shortcut(request, *match.groups() ) 135 131 136 if '/' in url: 132 137 return self.model_page(request, *url.split('/', 2)) 133 138