0001-misc-adapt-skeletontemplate-tag-for-3.2-64298.patch
combo/public/templatetags/combo.py | ||
---|---|---|
23 | 23 |
from decimal import DivisionByZero as DecimalDivisionByZero |
24 | 24 |
from decimal import InvalidOperation as DecimalInvalidOperation |
25 | 25 | |
26 |
import django |
|
26 | 27 |
from django import template |
27 | 28 |
from django.core import signing |
28 | 29 |
from django.core.exceptions import PermissionDenied |
... | ... | |
171 | 172 |
raise template.TemplateSyntaxError("%r tag requires exactly one argument" % token.contents.split()[0]) |
172 | 173 | |
173 | 174 |
tokens_copy = parser.tokens[:] |
175 |
if django.VERSION < (3,): |
|
176 |
tokens_copy.reverse() |
|
174 | 177 |
text = [] |
175 | 178 |
while True: |
176 |
token = tokens_copy.pop(0)
|
|
179 |
token = tokens_copy.pop() |
|
177 | 180 |
if token.contents == 'end_skeleton_extra_placeholder': |
178 | 181 |
break |
179 | 182 |
if token.token_type == TOKEN_VAR: |
180 |
- |