Skip to content

Commit

Permalink
Merge pull request matthewwithanm#512 from bsolomon1124/deprecation/u…
Browse files Browse the repository at this point in the history
…gettext_lazy

Use gettext_lazy in Django 2.0+ (ugettext_lazy is deprecated)
  • Loading branch information
vstoykov authored Jan 10, 2021
2 parents f5bc3ae + 1ac1143 commit 4cf8bd5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion imagekit/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from django.utils.translation import ugettext_lazy as _
from django import VERSION
if VERSION[0] < 2:
# ugettext is an alias for gettext() since Django 2.0,
# and deprecated as of Django 3.0.
from django.utils.translation import ugettext_lazy as _
else:
from django.utils.translation import gettext_lazy as _
from django.template.loader import render_to_string


Expand Down

0 comments on commit 4cf8bd5

Please sign in to comment.