Skip to content

Commit 92edd87

Browse files
authored
Signal no longer uses the args
Django 3.1 onwards no longer requires the args for Signal()
1 parent 3252159 commit 92edd87

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

template_profiler_panel/panels/template.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
from django.utils.translation import ugettext_lazy as _
1111
else:
1212
from django.utils.translation import gettext_lazy as _
13-
14-
template_rendered = Signal(providing_args=[
15-
'instance', 'start', 'end', 'level', 'processing_timeline',
16-
])
17-
13+
14+
if django.VERSION < (3, 1):
15+
template_rendered = Signal(providing_args=[
16+
'instance', 'start', 'end', 'level', 'processing_timeline',
17+
])
18+
else:
19+
template_rendered = Signal()
1820

1921
node_element_colors = {}
2022

0 commit comments

Comments
 (0)