From a01ebb4a5095f69f8e4884598012e1667b13d0cf Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Mon, 28 Jan 2008 05:36:44 +0000 Subject: [PATCH] Fixed #6354 -- Fixed url in `django/conf/urls/shortcut.py` to work with non-integer primary keys (refs #2033) and made use of the URL file in the admin urls. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7040 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/conf/urls/shortcut.py | 2 +- django/contrib/admin/urls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/conf/urls/shortcut.py b/django/conf/urls/shortcut.py index f0ed9d9fd0..135f3be840 100644 --- a/django/conf/urls/shortcut.py +++ b/django/conf/urls/shortcut.py @@ -1,5 +1,5 @@ from django.conf.urls.defaults import * urlpatterns = patterns('django.views', - (r'^(?P\d+)/(?P\d+)/$', 'defaults.shortcut'), + (r'^(?P\d+)/(?P.*)/$', 'defaults.shortcut'), ) diff --git a/django/contrib/admin/urls.py b/django/contrib/admin/urls.py index 508bb3a1ca..436e9b7b23 100644 --- a/django/contrib/admin/urls.py +++ b/django/contrib/admin/urls.py @@ -8,7 +8,7 @@ else: urlpatterns = patterns('', ('^$', 'django.contrib.admin.views.main.index'), - ('^r/(\d+)/(.*)/$', 'django.views.defaults.shortcut'), + ('^r/', include('django.conf.urls.shortcut')), ('^jsi18n/$', i18n_view, {'packages': 'django.conf'}), ('^logout/$', 'django.contrib.auth.views.logout'), ('^password_change/$', 'django.contrib.auth.views.password_change'),