mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-24 19:32:53 +03:00
Set LOCALIZED_FIELDS_EXPERIMENTAL to True by default
This commit is contained in:
parent
2bcab4d83a
commit
92b1dce239
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user