The error is due to how the TemplateResponse is being constructed in the render function within the Jinja class. Specifically, the error arises because the TemplateResponse method is being called with an incorrect argument: request=request. The request should be part of the context dictionary, not passed as a separate argument.
Also fixed some obvious Ruff warnings and silenced the rest non-critical comment related warnings.
Fixing the following error:
The error is due to how the
TemplateResponse
is being constructed in the render function within theJinja
class. Specifically, the error arises because theTemplateResponse
method is being called with an incorrect argument:request=request
. The request should be part of the context dictionary, not passed as a separate argument.Also fixed some obvious Ruff warnings and silenced the rest non-critical comment related warnings.