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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -