Commit Graph
149 Commits
Author SHA1 Message Date
Swen Kooij 1b3e5989d3 LocalizedUniqueSlugField should properly deconstruct 'enabled' flag 2021-03-13 13:45:22 +02:00
Swen Kooij bd8924224e Add flag to disable LocalizedUniqueSlugField 2021-03-13 13:24:36 +02:00
Swen Kooij afb94ecf66 Add a flag to make LocalizedUniqueSlugField immutable 2020-11-27 16:36:23 +02:00
Cristi Ingineru 8ed09f712d Prevent accumulating redundant data 2020-11-25 12:00:11 +02:00
seroyandSwen Kooij c9ae71aec7 introduce ActiveRef and TranslatedRef lookups 2020-10-07 11:56:33 +03:00
Swen Kooij 5a9ff191d4 Use force_str() over force_text()
force_text() is going to be removed in Django 4.0
It's just an alias for now.
2020-10-07 11:52:24 +03:00
tudorvaran 7f48903137 Change from docstring comment to normal 2020-04-29 12:16:25 +03:00
tudorvaran 3bf4435622 Disable show_hidden_initial for localized forms 2020-04-28 21:23:03 +03:00
tudorvaran 77e8807876 Revert "Fix callable default usage in admin forms"
This reverts commit f807212c
2020-04-28 21:16:15 +03:00
tudorvaran f807212cf3 Fix callable default usage in admin forms 2020-04-28 18:31:15 +03:00
Alexandru Arnautu 8968b0c7a8 Format and lint code 2020-03-10 09:33:34 +02:00
Alexandru Arnautu 5e1d46669c Create LocalizedNumericValue with __int__ and __float__ methods 2020-03-10 09:28:52 +02:00
Alexandru Arnautu 5ed1a1219d Add LocalizedFloatField 2020-03-10 09:27:31 +02:00
Alexandru Arnautu 0d9ec6385c Add LocalizedFloatValue 2020-03-10 09:26:00 +02:00
tudorvaran 905bfd4353 Format with black 2020-02-12 17:05:17 +02:00
tudorvaran 47367da401 Accept callables as values in fields 2020-02-12 16:37:44 +02:00
Swen Kooij 49d88af76a Python 3.6, 3.9 and Django 3.0 compatibility 2020-01-06 16:51:30 +01:00
jar3b 769066a461 fix: remove django.utils.six import and usage due to Django 3.0 dropped support for it 2019-12-14 23:12:01 +03:00
Swen Kooij 92b1dce239 Set LOCALIZED_FIELDS_EXPERIMENTAL to True by default 2019-10-20 18:05:06 +03:00
Swen Kooij 7bf0311306 Add a language argument to LocalizedValue.translate(..) 2019-10-20 16:49:33 +03:00
Swen Kooij e5dcc1b492 Fix #72: LocalizedIntegerField should sort numerically, not lexicographically 2019-10-19 15:48:29 +03:00
Swen Kooij 19f0ddb336 Fix some flake8/pycodestyle issues 2019-10-19 13:04:53 +03:00
Swen Kooij 7cdd1f4490 Re-format all files 2019-10-19 12:44:41 +03:00
Swen Kooij 3de1492a58 Use collections.abc.Iterable instead of collections.Iterable
The latter is going to be removed after Python 3.8
2019-08-14 08:57:05 +03:00
Swen Kooij 36f6e946b0 Attempt at reducing deprecation warning spam 2019-06-27 15:15:44 +03:00
Dmitry Groshev 6a7545a910 update to support Django 2.2 2019-05-30 13:11:33 +01:00
Adrian Muntean d8b872758c Return empty string in case of None 2019-02-20 12:26:04 +02:00
Adrian Muntean a0ca977cab Set None in case the LocalizedIntegerField is null
In case the LocalizedIntegerField is null in the DB then it must explicitly be set to None,
otherwise it will yield TypeError: __str__ returned non-string
2019-02-14 14:48:38 +02:00
Swen KooijandGitHub 25417b5815 Merge pull request #56 from sliverc/user_defined_pk_descriptor
Avoid DoesNotExist error when creating model with user defined pk
2019-01-11 14:47:33 +02:00
Swen KooijandGitHub abd1587ca0 Merge pull request #54 from sliverc/query_by_active_lang
Add support for localized query lookups
2019-01-11 14:47:18 +02:00
Swen KooijandGitHub 60fc79e9ff Merge pull request #57 from velrest/master
Fix typo in documentation for clean
2019-01-11 14:46:21 +02:00
Swen KooijandGitHub ca470fc577 Merge pull request #49 from MELScience/admin-fix
Add tests for LocalizedFieldsAdminMixin
2019-01-11 14:46:10 +02:00
Swen KooijandGitHub d66f5085a8 Merge branch 'master' into hstore_extension 2019-01-11 14:40:38 +02:00
Oliver Sauder ff836836bf Add support for localized query look ups 2018-12-03 09:45:08 +01:00
Cristi Ingineru 4922a1b93f self.translate() 2018-09-24 12:57:46 +03:00
Jonas Cosandey d308e773cf fix typo 2018-09-12 14:27:44 +02:00
Oliver Sauder b3b88d6d28 Avoid does not exist error when creating model with user defined pk 2018-09-10 12:05:46 +02:00
Oliver Sauder 6c902229ce Enable HStore extension for localized fields to work 2018-08-27 15:07:41 +02:00
Cristi Ingineru 4f83cbf4ed Add LocalizedIntegerFieldWidget 2018-08-16 14:27:38 +03:00
Cristi Ingineru 13e2666a51 Copy the widget for each language 2018-06-28 12:33:44 +03:00
Swen Kooij 1b1d24a460 Make defaults work for LocalizedIntegerField 2018-06-15 17:07:12 +03:00
Swen Kooij fb233e8f25 Make sure values are strings before saving LocalizedIntegerValue 2018-06-15 16:19:32 +03:00
Swen Kooij 90597da8fd Add a LocalizedIntegerField 2018-06-15 12:58:01 +03:00
Swen Kooij 752e17064d Deprecate LocalizedFileValue.localized() 2018-06-14 08:01:10 +03: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
seroy 8ba0540237 Fix using LocalizedFieldsAdminMixin with inlines 2018-04-20 02:33:15 +03:00
Swen Kooij a76101c9ad Fix LocalizedFieldsAdminMixin not having a base class
This was a breaking change and broke a lot of projects.
2018-04-02 15:59:16 +03:00
Swen Kooij d25b1b92fe Merge branch 'master' of https://github.com/SectorLabs/django-localized-fields 2018-03-31 16:53:48 +03:00
Swen Kooij ccc46e1899 Allow raw dicts to be used in update statements 2018-03-31 16:53:10 +03:00
seroy f161b5d047 fix admin widget tabs width in inline formset 2018-03-01 13:22:54 +03:00