Commit Graph
148 Commits
Author SHA1 Message Date
Bogdan Hopulele 52145ca7d3 Add experimental features flag for LocalizedField
With the flag set, LocalizedField will return None if there is no
database value.
2017-03-23 17:32:37 +02:00
Swen KooijandGitHub 5df44b0d62 Merge pull request #7 from MELScience/import_error
fixed "Apps aren't loaded yet." exception
2017-03-22 17:48:18 +02:00
seroy 03df76d6d7 LocalizedUniqueSlugField refactored 2017-03-18 22:58:11 +03:00
seroy 465e35ba8a fixed ImportError if django-bleach not installed 2017-03-18 19:04:51 +03:00
seroy 9754134298 fixed "Apps aren't loaded yet." exception 2017-03-18 18:26:33 +03:00
seroy f0c7a72078 LocalizedModel keeped for backwards compatibility 2017-03-18 17:51:31 +03:00
seroy 7f4dfbae1f changed style of active and inactive tabs 2017-03-17 18:22:19 +03:00
seroy d07da55215 Advanced django admin integration 2017-03-17 06:22:31 +03:00
seroy 340dde18cd no need inheritance from LocalizedModel anymore. Introduction of LocalizedValueDescriptor 2017-03-13 00:50:34 +03:00
Swen Kooij b5f4c43d6b LocalizedValue is now cast-able to dict 2017-03-09 14:32:33 +02:00
Swen Kooij 3d08475468 __eq__ should only compare same types
unless it's a string
2017-03-09 11:59:21 +02:00
Swen Kooij 6cb4cdf52e Now inheriting from PostgresModel for upserts 2017-02-24 14:35:29 +02:00
Swen Kooij 43a48403e9 LocalizedField should not set required twice 2017-02-24 12:28:56 +02:00
Swen Kooij d7bd217a90 Ported to use django-postgres-extra 2017-02-21 17:36:56 +02:00
Swen Kooij 6d7a937eac Don't regenerate slug if not needed 2017-02-16 10:13:10 +02:00
Swen Kooij 679dcafef6 Pop kwargs after calling super constructor 2017-02-16 09:36:26 +02:00
Swen Kooij ad2ef34546 Bump version number to 2.9 2017-02-15 19:29:29 +02:00
Swen Kooij ca6b1c88fa Add option include_time to LocalizedUniqueSlugField 2017-02-15 19:13:19 +02:00
Swen Kooij b121dfc2d7 Added __eq__ operator to LocalizedValue 2017-02-09 14:57:08 +02:00
Swen Kooij d529da8886 Fixed bug with with missing populate_from 2017-02-03 11:14:37 +02:00
Swen Kooij 302a64a02c Updated base classes in documentation 2017-02-03 10:40:37 +02:00
Swen Kooij bb11253207 Moved retry mechanism to mixin 2017-02-03 10:35:39 +02:00
Swen Kooij 5db87763fb Rename LocalizedMagicSlugField to LocalizedUniqueSlugField 2017-02-03 10:27:30 +02:00
Swen Kooij d5ed3ced40 Raise IntegrityError if it's not about the slug 2017-02-02 17:08:06 +02:00
Swen Kooij 9a976d5ec8 Added max retries option + tests 2017-02-02 15:01:40 +02:00
Swen Kooij 1ef02616ec Added tests for custom db-backend 2017-02-02 14:36:22 +02:00
Swen Kooij a48eb12370 Add a new auto-slug field that is concurrency resistent 2017-02-02 10:58:04 +02:00
Swen Kooij e14350fbf3 Started work on LocalizedMagicSlugField
This will be a superior version of LocalizedAutoSlugField, but one
that doesn't have concurrency issues and takes advantage of the
new UNIQUE CONSTRAINTs.
2017-02-01 16:59:13 +02:00
Swen Kooij 105c1e7b6b Move LocalizedValue and add get_language_codes 2017-02-01 15:06:36 +02:00
Swen Kooij 680383b636 Added custom back-end to allow uniqueness 2017-01-31 18:04:32 +02:00
Swen Kooij ed1559ec31 HStoreIndex, unique indexes on hstore keys 2017-01-30 16:22:44 +02:00
Swen Kooij fc31e1e5f1 Fixed slugs not being generated for unicode texts 2017-01-26 01:18:46 +02:00
Emil Luta 5f5568d380 Allow localized fields to be inited with dicts 2017-01-12 15:49:59 +02:00
Swen Kooij 9d7e3a5655 AutoSlugField should not use LIKE 2017-01-10 15:10:41 +02:00
Swen Kooij 98cc4c08d1 Made tests work once again 2016-12-16 08:50:04 +02:00
Swen Kooij 3adfe509b2 String constructor for LocalizedValue
This allows you to do: LocalizedValue('thing'), which would result in a LocalizedValue looking
like this:

     {'en': 'thing', 'ar': None}
2016-12-16 08:30:56 +02:00
Swen Kooij 39a573e1d2 Use Textarea widget for LocalizedFieldWidget 2016-12-08 16:45:40 +02:00
Swen Kooij 9f46dc4ca9 Fixed bug with options not being passed to bleach properly 2016-10-26 17:03:34 +03:00
Swen Kooij 6d9ee5df8d Export all classes from localized_fields 2016-10-24 13:34:49 +03:00
Swen Kooij 1b94bf2cd8 LocalizedAutoSlugField should not use LocalizedForm 2016-10-24 13:03:40 +03:00
Swen Kooij c081b0431d Created abstract model to take care of default values 2016-10-24 11:50:21 +03:00
Swen Kooij 69718c376f Added a proper deconstruct method to LocalizedValue 2016-10-23 16:53:31 +03:00
Swen Kooij 7e410e857b Fixed a bug that would make creation forms crash 2016-10-23 16:44:33 +03:00
Swen Kooij 666335f3a7 Added a default value for LocalizedField 2016-10-22 21:59:42 +03:00
Swen Kooij c4a4d0172e Added pep8, flake8 and pylint configuration 2016-10-21 13:05:45 +03:00
Swen Kooij 1cd3812d2a Moved tests to tests/ 2016-10-21 12:57:51 +03:00
Swen Kooij 612b3bf427 Added initial implementation + tests 2016-10-21 12:21:11 +03:00
Swen Kooij 095fd892e8 Created empty Django app 2016-10-21 10:58:44 +03:00