Officially deprecate LocalizedAutoSlugField

This commit is contained in:
Swen Kooij 2017-06-26 13:10:21 +03:00
parent 833ceb849c
commit b10472d3e9

View File

@ -1,3 +1,5 @@
import warnings
from typing import Callable, Tuple, Union
from datetime import datetime
@ -21,6 +23,11 @@ class LocalizedAutoSlugField(LocalizedField):
self.populate_from = kwargs.pop('populate_from', None)
self.include_time = kwargs.pop('include_time', False)
warnings.warn(
'LocalizedAutoSlug is deprecated and will be removed in the next major version.',
DeprecationWarning
)
super(LocalizedAutoSlugField, self).__init__(
*args,
**kwargs