Skip to content
Myr

explanation for a strange monkey patch in django2jinja (thanks djc)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 671e06b · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:ext/django2jinja/django2jinja.py+4 added-1 removed
84 unmodified lines
85_resolved_filters = {}86_newline_re = re.compile(r'(?:\r\n|\r|\n)')878889# don't ask....89# Django stores an itertools object on the cycle node. Not only is this90# thread unsafe but also a problem for the converter which needs the raw91# string values passed to the constructor to create a jinja loop.cycle()92# call from it.93_old_cycle_init = core_tags.CycleNode.__init__94def _fixed_cycle_init(self, cyclevars, variable_name=None):95 self.raw_cycle_vars = map(Variable, cyclevars)96 _old_cycle_init(self, cyclevars, variable_name)
672 unmodified lines