By default, if a variable that isn't present in the context is used in a template, Django simply skips it, rather than raising an exception. This might not be good even in production, but I suggest that at least in testing we use something like this snippet to override this with strict checking, to catch misspellings, templates that use a variable that isn't accessible, etc. This could be done by creating a testing-specific settings.py file or some other method.
By default, if a variable that isn't present in the context is used in a template, Django simply skips it, rather than raising an exception. This might not be good even in production, but I suggest that at least in testing we use something like this snippet to override this with strict checking, to catch misspellings, templates that use a variable that isn't accessible, etc. This could be done by creating a testing-specific
settings.py
file or some other method.