I want the table to appear with all headings even when there is no content. Now, only 'Add' button appears when there isn't anything in the database. How do I do this? Please help
It looks like this with no content:
It looks like this with content:
So with no content, it should still show the table headings. Suggest any way?
Copy the template at
django/contrib/admin/templates/admin/change_list_results.html
to your admin template folder.Keep that structure:
project -app -templates -admin -change_list_results.html -manage.py
Than, remove the
{% if results %} - {% endif %}
tags from the new template file and it should work.