Add experimental features flag for LocalizedField

With the flag set, LocalizedField will return None if there is no
database value.
This commit is contained in:
Bogdan Hopulele
2017-03-23 17:32:26 +02:00
parent 5df44b0d62
commit 52145ca7d3
5 changed files with 35 additions and 7 deletions

View File

@@ -244,6 +244,16 @@ Besides ``LocalizedField``, there's also:
title = LocalizedField()
description = LocalizedBleachField()
Experimental feature
^^^^^^^^^^^^^^^^^^^^
Enables the following experimental features:
* ``LocalizedField`` will return ``None`` instead of an empty ``LocalizedValue`` if there is no database value.
.. code-block:: python
LOCALIZED_FIELDS_EXPERIMENTAL = True
Frequently asked questions (FAQ)
--------------------------------