mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-24 19:32:53 +03:00
LocalizedAutoSlugField should only warn about deprecation if used
This commit is contained in:
parent
0f30cc1493
commit
cc911d4909
@ -16,14 +16,14 @@ from .field import LocalizedField
|
||||
class LocalizedAutoSlugField(LocalizedField):
|
||||
"""Automatically provides slugs for a localized field upon saving."""
|
||||
|
||||
warnings.warn(
|
||||
"LocalizedAutoSlug is deprecated and will be removed in the next major version.",
|
||||
DeprecationWarning,
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initializes a new instance of :see:LocalizedAutoSlugField."""
|
||||
|
||||
warnings.warn(
|
||||
"LocalizedAutoSlug is deprecated and will be removed in the next major version.",
|
||||
DeprecationWarning,
|
||||
)
|
||||
|
||||
self.populate_from = kwargs.pop("populate_from", None)
|
||||
self.include_time = kwargs.pop("include_time", False)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user