Hello I need to extend the admin view for a model so I can retrieve the items I want and use them at the extended admin templete for that model. I couldn't find enough docs about this. d Thanks
A:
Are you looking for this, it's new in 1.1:
Copying the relevant code from the link with some slight modifications, it's supposed to go into your app's admin.py
:
class MyModelAdmin(admin.ModelAdmin):
def get_urls(self):
urls = super(MyModelAdmin, self).get_urls()
my_urls = patterns('app.your_admin_views',
(r'^my_view/$', self.my_view)
)
return my_urls + urls
You could place the new admin views in a file called your_admin_views.py
under your app directory or whichever way you want.
Thierry Lam
2009-09-02 19:35:40