Displaying table header even when there is no content? (django admin page) -


i want table appear headings when there no content. now, 'add' button appears when there isn't in database. how do this? please help

it looks no content:

enter image description here

it looks content:

enter image description here

so no content, should still show table headings. suggest way?

copy template @ django/contrib/admin/templates/admin/change_list_results.html admin template folder.

keep structure:

project -app -templates -admin -change_list_results.html -manage.py

than, remove {% if results %} - {% endif %} tags new template file , should work.


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -