mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 11:42:54 +03:00
Officially deprecate LocalizedAutoSlugField
This commit is contained in:
parent
833ceb849c
commit
b10472d3e9
@ -1,3 +1,5 @@
|
|||||||
|
import warnings
|
||||||
|
|
||||||
from typing import Callable, Tuple, Union
|
from typing import Callable, Tuple, Union
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
@ -21,6 +23,11 @@ class LocalizedAutoSlugField(LocalizedField):
|
|||||||
self.populate_from = kwargs.pop('populate_from', None)
|
self.populate_from = kwargs.pop('populate_from', None)
|
||||||
self.include_time = kwargs.pop('include_time', False)
|
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__(
|
super(LocalizedAutoSlugField, self).__init__(
|
||||||
*args,
|
*args,
|
||||||
**kwargs
|
**kwargs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user