Skip to content

Commit 4ab09e4

Browse files
authored
Updating the translation for Django 3,2+
Partial fix for #19 where the import of the translation library is outdated for Django 3.2+ if django.VERSION < (3, 2): from django.utils.translation import ugettext_lazy as _ else: from django.utils.translation import gettext_lazy as _
1 parent eaa8ee0 commit 4ab09e4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

template_profiler_panel/panels/template.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
from debug_toolbar.panels import Panel
77
from debug_toolbar.panels.sql.utils import contrasting_color_generator
88
from django.dispatch import Signal
9-
from django.utils.translation import ugettext_lazy as _
10-
9+
if django.VERSION < (3, 2):
10+
from django.utils.translation import ugettext_lazy as _
11+
else:
12+
from django.utils.translation import gettext_lazy as _
13+
1114
template_rendered = Signal(providing_args=[
1215
'instance', 'start', 'end', 'level', 'processing_timeline',
1316
])

0 commit comments

Comments
 (0)