i want to display additional sidebar in my django admin index. I have created templates/admin/index.html and it show up. Now i need some data from model. To do this I have created index function in the file admin/views.py
def index(request):
var = 'var'
return render_to_response('admin/index.html', {'var': var})
Without this function I have error ViewDoesNotExist.
However template not react for this sample variable ‘var’. Moreover my app doesn’t display in the index. I have only auth app.
I think that I’m overwriting index function form admin view. How to properly overwrite this function?
Consider using django admin tools https://bitbucket.org/izi/django-admin-tools/wiki/Home
then you get commands like
manage.py customdashboard,manage.py custommenuetc.It even has a nice bookmark-functionality to quickliy jump to certain objects or list pages.