Ticket #3015: admin-urls-permalink-compatible.patch

File admin-urls-permalink-compatible.patch, 1.8 KB (added by Collin Grady <cgrady@…>, 18 years ago)
  • django/contrib/admin/urls.py

     
    88
    99urlpatterns = patterns('',
    1010    ('^$', 'django.contrib.admin.views.main.index'),
    11     ('^r/(\d+)/(.*)/$', 'django.views.defaults.shortcut'),
     11    ('^r/(?P<content_type_id>\d+)/(?P<object_id>.*)/$', 'django.views.defaults.shortcut'),
    1212    ('^jsi18n/$', i18n_view, {'packages': 'django.conf'}),
    1313    ('^logout/$', 'django.contrib.auth.views.logout'),
    1414    ('^password_change/$', 'django.contrib.auth.views.password_change'),
     
    3131    ('^auth/user/add/$', 'django.contrib.admin.views.auth.user_add_stage'),
    3232
    3333    # Add/change/delete/history
    34     ('^([^/]+)/([^/]+)/$', 'django.contrib.admin.views.main.change_list'),
    35     ('^([^/]+)/([^/]+)/add/$', 'django.contrib.admin.views.main.add_stage'),
    36     ('^([^/]+)/([^/]+)/(.+)/history/$', 'django.contrib.admin.views.main.history'),
    37     ('^([^/]+)/([^/]+)/(.+)/delete/$', 'django.contrib.admin.views.main.delete_stage'),
    38     ('^([^/]+)/([^/]+)/(.+)/$', 'django.contrib.admin.views.main.change_stage'),
     34    ('^(?P<app_label>[^/]+)/(?P<model_name>[^/]+)/$', 'django.contrib.admin.views.main.change_list'),
     35    ('^(?P<app_label>[^/]+)/(?P<model_name>[^/]+)/add/$', 'django.contrib.admin.views.main.add_stage'),
     36    ('^(?P<app_label>[^/]+)/(?P<model_name>[^/]+)/(?P<object_id>.+)/history/$', 'django.contrib.admin.views.main.history'),
     37    ('^(?P<app_label>[^/]+)/(?P<model_name>[^/]+)/(?P<object_id>.+)/delete/$', 'django.contrib.admin.views.main.delete_stage'),
     38    ('^(?P<app_label>[^/]+)/(?P<model_name>[^/]+)/(?P<object_id>.+)/$', 'django.contrib.admin.views.main.change_stage'),
    3939)
    4040
    4141del i18n_view
Back to Top