mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 03:32:55 +03:00
Attempt at reducing deprecation warning spam
This commit is contained in:
parent
909ebfee69
commit
36f6e946b0
@ -17,17 +17,17 @@ class LocalizedAutoSlugField(LocalizedField):
|
|||||||
"""Automatically provides slugs for a localized
|
"""Automatically provides slugs for a localized
|
||||||
field upon saving."""
|
field upon saving."""
|
||||||
|
|
||||||
|
warnings.warn(
|
||||||
|
'LocalizedAutoSlug is deprecated and will be removed in the next major version.',
|
||||||
|
DeprecationWarning
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
"""Initializes a new instance of :see:LocalizedAutoSlugField."""
|
"""Initializes a new instance of :see:LocalizedAutoSlugField."""
|
||||||
|
|
||||||
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