mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-06-27 22:03:21 +03:00
Deprecate LocalizedFileValue.localized()
This commit is contained in:
parent
def7dae640
commit
752e17064d
@ -1,7 +1,7 @@
|
||||
import deprecation
|
||||
import collections
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils import translation
|
||||
|
||||
@ -194,6 +194,9 @@ class LocalizedFileValue(LocalizedValue):
|
||||
"""Returns string representation of value"""
|
||||
return str(super().__str__())
|
||||
|
||||
@deprecation.deprecated(deprecated_in='4.6', removed_in='5.0',
|
||||
current_version='4.6',
|
||||
details='Use the translate() function instead.')
|
||||
def localized(self):
|
||||
"""Returns value for current language"""
|
||||
return self.get(translation.get_language())
|
||||
|
@ -1 +1,2 @@
|
||||
django-postgres-extra==1.21a9
|
||||
deprecation==2.0.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user