I have been using django for a while and I am now converting to jinja2 because GAE told me too. One of the short cuts I use for django is to pass “self” to django when rendering my template so that in my template I call {{ self.stuff }}. In jinja it seems that “self” represents something. Does this require me to change all my templates to use perhaps “this”?
Share
selfis actually used by Jinja2 to allow you to reference blocks:Simply use another name and everything will work (i.e., rather than
selfusethisorobjas suggested by @Skirmantas).