add depreciation warning

This commit is contained in:
Lukas Bockstaller
2026-07-20 17:04:32 +02:00
parent 003652d564
commit 4cfcb9ede1
+2
View File
@@ -473,8 +473,10 @@ class RelativeDateTimeField(forms.MultiValueField):
limit = kwargs.pop('limit_choices')
if any(["__" not in l for l in limit]):
_warn_skips = (str(os.path.dirname(__file__)),)
warnings.warn(
message="Please prefix limit_choices with the base the attributes refer to, for example event__date_from",
category=DeprecationWarning,
skip_file_prefixes=_warn_skips
)