11 Commits

Author SHA1 Message Date
Swen Kooij
92cb5e8b1f Add LocalizedValue.is_empty() 2021-03-22 07:47:00 +02:00
Swen Kooij
7bf0311306 Add a language argument to LocalizedValue.translate(..) 2019-10-20 16:49:33 +03:00
Swen Kooij
7cdd1f4490 Re-format all files 2019-10-19 12:44:41 +03:00
Swen Kooij
b2f50ec82b Convert to use CircleCI and run tests against Django 2.1/Python 3.7 2019-01-11 14:37:03 +02:00
Swen Kooij
def7dae640 Add LocalizedValue.translate()
LocalizedValue.translate() behaves the exact same as the str(..) cast
works, with the exception that it returns None if there is no value
instead of an empty string. This makes it easier to implement custom
value classes on top of the LocalizedValue class.

Behavior for str(..) stays the same as it was.
2018-06-14 07:57:02 +03:00
Swen Kooij
af02593ebd Add test to make sure LocalizedValue doesn't cast values to string 2018-03-31 08:52:12 +03:00
Swen Kooij
08690ab361 Fix outstanding PEP8 and Flake8 issues 2017-07-15 14:06:50 +03:00
Swen Kooij
7316d312b4 Add simple test for LOCALIZED_FIELDS_FALLBACKS setting 2017-06-26 13:36:21 +03:00
Swen Kooij
92a53bc3d7 Fix various pep8/flake8/pylint errors 2017-05-25 19:40:03 +03:00
Swen Kooij
5a4f449363 Fix support for ArrayAgg 2017-05-25 19:23:52 +03:00
Swen Kooij
2205f9c6a4 Move LocalizedValueTest into dedicated file 2017-05-25 19:16:04 +03:00