Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #6354 -- Fixed url in `django/conf/urls/shortcut.py` to work wi…

…th 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
  • Loading branch information...
commit a01ebb4a5095f69f8e4884598012e1667b13d0cf 1 parent 2e43934
@gdub gdub authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  django/conf/urls/shortcut.py
  2. +1 −1  django/contrib/admin/urls.py
View
2  django/conf/urls/shortcut.py
@@ -1,5 +1,5 @@
from django.conf.urls.defaults import *
urlpatterns = patterns('django.views',
- (r'^(?P<content_type_id>\d+)/(?P<object_id>\d+)/$', 'defaults.shortcut'),
+ (r'^(?P<content_type_id>\d+)/(?P<object_id>.*)/$', 'defaults.shortcut'),
)
View
2  django/contrib/admin/urls.py
@@ -8,7 +8,7 @@
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'),
Please sign in to comment.
Something went wrong with that request. Please try again.