1

Is there a way to modify the Django admin to accept named groups in all admin URLs? For example, I would like to be able to say

urlpatterns = patterns('',
    # ...
    url(r'^/admin/(?P<year>[0-9]+)/', include(custom_admin.site.urls))
)

However, visiting /admin/2014 gives a TypeError, saying that index() got an unexpected keyword argument 'year'. How can I pass URL parameters along to the admin?

Casey Falk
  • 2,617
  • 1
  • 18
  • 29
rlmv
  • 352
  • 3
  • 6

1 Answers1

-1

correct your URL

?P<year>[0-9]{4})

it should be like this

Petter Friberg
  • 21,252
  • 9
  • 60
  • 109
Pankaj78691
  • 354
  • 2
  • 7