According to the Django testing docs, the Django client Response object contains 'templates', which is: "A list of Template instances used to render the final content, in the order they were rendered. For each template in the list, use template.name to get the template's file name, if the template was loaded from a file. (The name is a string such as 'admin/index.html'.)"
However, I am getting an empty list of templates, even though I am confident that a template was rendered.
from django.test.client import Client
c = Client()
response = c.post('/signup/', {'email': 'a@b.com', 'password1': 'smith', 'password2': 'smith'}, follow=True)
print response.templates
# []
Why is templates empty? How do I see what template was rendered?
Have you tried your code in a interactive session? The Django documentation says:
So if you run it in a test run, it should work.
[+] I have replaced the * the above example from the django documentation with your code * to make this snippet more readable.