[Answer]-How do I find where a django template variable comes from in the python

1👍

Look at the URL of the page. Then go to urls.py and look at which view is linked to the URL. Then open views.py and search for the view which the URL linked to.

In that view, the variable ‘x’ should be there. If it’s not, then check the template context processors and middlewares as karthikr suggested.

Leave a comment