Add your custom urls before the admin include urls directive:
urlpatterns += patterns('',
(r'^admin/myview/$', 'your_admin_view'),
(r'^admin/', include(admin.site.urls)),
...
and continue working as usual. Django will go through the urls in descending
order matching your custom url
Hello,
I am trying to extend AdminSite so I can provide custom views, so far
i have this:
class MyAdminSite(AdminSite):
def get_urls(self):
urls = super(self.__class__, self).get_urls()
my_urls = patterns('',
(r'^myview/$', self.admin_view(myview))
)
2 matches
Mail list logo