Write unit test in tests.py where you create the template using django.templates.Template . Check to see if anything else is displayed than None or "" or a space.
Once this unit test succeeds, you can move on to the following:
Use self.client to render the template using the full stack. If the problem is here, and not in the previous unit test, maybe something is wrong with your view function.
If you don't include your test code in try-catch, you get a full stack trace when something goes wrong. If there is no stack trace, but your test fails, you know you did something wrong.
In my opinion, unit tests in Django are real time keepers.
source share