mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-10-30 02:28:57 +03:00
Set LOCALIZED_FIELDS_EXPERIMENTAL to True by default
This commit is contained in:
@@ -12,7 +12,7 @@ class LocalizedFieldsConfig(AppConfig):
|
|||||||
name = "localized_fields"
|
name = "localized_fields"
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
if getattr(settings, "LOCALIZED_FIELDS_EXPERIMENTAL", False):
|
if getattr(settings, "LOCALIZED_FIELDS_EXPERIMENTAL", True):
|
||||||
for _, clazz in inspect.getmembers(lookups):
|
for _, clazz in inspect.getmembers(lookups):
|
||||||
if not inspect.isclass(clazz) or clazz is LocalizedLookupMixin:
|
if not inspect.isclass(clazz) or clazz is LocalizedLookupMixin:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class LocalizedField(HStoreField):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if not value:
|
if not value:
|
||||||
if getattr(settings, "LOCALIZED_FIELDS_EXPERIMENTAL", False):
|
if getattr(settings, "LOCALIZED_FIELDS_EXPERIMENTAL", True):
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return cls.attr_class()
|
return cls.attr_class()
|
||||||
|
|||||||
Reference in New Issue
Block a user