Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
url_filter/validators.py:22: RemovedInDjango40Warning: django.utils.translation.ungettext_lazy() is deprecated in favor of django.utils.translation.ngettext_lazy().
  • Loading branch information
Bastien Vallet committed May 18, 2020
1 parent be45506 commit cc08713
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions url_filter/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MinLengthValidator as _MinLengthValidator,
)
from django.utils.deconstruct import deconstructible
from django.utils.translation import ungettext_lazy
from django.utils.translation import ngettext_lazy


@deconstructible
Expand All @@ -13,7 +13,7 @@ class MinLengthValidator(_MinLengthValidator):
"""

code = "min_length"
message = ungettext_lazy(
message = ngettext_lazy(
"Ensure this value has at least %(limit_value)d items (it has %(show_value)d).",
"Ensure this value has at least %(limit_value)d items (it has %(show_value)d).",
"limit_value",
Expand All @@ -33,7 +33,7 @@ class MaxLengthValidator(_MaxLengthValidator):
"""

code = "max_length"
message = ungettext_lazy(
message = ngettext_lazy(
"Ensure this value has at most %(limit_value)d items (it has %(show_value)d).",
"Ensure this value has at most %(limit_value)d items (it has %(show_value)d).",
"limit_value",
Expand Down

0 comments on commit cc08713

Please sign in to comment.