Commit graph

962 commits

Author SHA1 Message Date
Serg Tereshchenko
177e896a4e chore: Remove unused jquery.mb.browser. 2020-09-30 23:03:23 +03:00
Serg Tereshchenko
02b1abbbe3 chore: Apply black. 2020-09-30 22:54:52 +03:00
Serg Tereshchenko
9eaabb6151 chore(release): 0.15.2 2020-09-08 14:50:29 +03:00
Fernando
ac91740a5c
feat: Adds a language option to the update_translation_fields commands
Refs #563
Co-authored-by Fernando Cordeiro <fernando.cordeiro@jeronimo-martins.com>
2020-08-18 10:33:41 +03:00
Sergey Tereschenko
7a8a96ba18 chore(flake8): Fix linter errors. 2020-07-10 09:19:01 +03:00
Sergey Tereschenko
4812749121 chore(release): 0.15.1 2020-07-10 09:06:20 +03:00
Can Mustafa Özdemir
48e7f59895
fix(admin): Fix custom widget initialization problem 2020-06-13 10:41:18 +03:00
partizan
3c0adc4c8a
Merge pull request #553 from DrMeers/master
correct FieldDoesNotExist exception import; will break in dev Django release
2020-05-06 19:56:57 +03:00
Simon Meers
e67d3ee3c5 correct FieldDoesNotExist exception import; will break in dev Django release 2020-05-06 09:28:36 +10:00
partizan
1434572544
Update CHANGELOG.md 2020-05-01 08:17:29 +03:00
Sergey Tereschenko
18cdd00f12 Merge branch 'master' of github.com:deschler/django-modeltranslation 2020-05-01 08:16:07 +03:00
Sergey Tereschenko
21934ac2eb docs(install): Update compatible versions 2020-05-01 08:15:58 +03:00
Sergey Tereschenko
3cad653a8c chore(release): 0.15.0 2020-04-22 18:08:53 +03:00
Sergey Tereschenko
313de70076 build: Prepare project for standard-version releases. 2020-04-22 18:04:01 +03:00
Sergey Tereschenko
5d6d0038db build: Converted changelog to markdown 2020-04-22 13:41:06 +03:00
partizan
11d9762b73
Merge pull request #549 from BackMarket/fix-unexpected-auth-migration-creation
Fix: prevent a new migration from being created each time makemigrations is run
2020-04-22 11:46:34 +03:00
Grégoire Deveaux
205a8f6c2f Fix: add NewMultilingualManager __eq__() 2020-04-21 16:58:21 +02:00
partizan
6a98a0b997
Merge pull request #545 from timgates42/bugfix_typo_splittable
docs: Fix simple typo, splitable -> splittable
2020-03-24 16:25:57 +02:00
Tim Gates
01a41783cb
docs: Fix simple typo, splitable -> splittable
There is a small typo in modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js, modeltranslation/utils.py.

Should read `splittable` rather than `splitable`.
2020-03-24 19:29:02 +11:00
partizan
4617551ea7
Merge pull request #544 from mondeja/master
style: Updated gitter badge style
2020-03-23 09:26:29 +02:00
mondeja
5711d6cf7d
Updated gitter badge style
Gitter badge with the same style than other badges
2020-03-21 01:22:39 +01:00
Sergey Tereschenko
2c87d7f18b build(ci): fix ci 2020-03-19 22:45:13 +02:00
Sergey Tereschenko
49e89c840c build(ci): Update travis.yml 2020-03-19 22:19:57 +02:00
Sergey Tereschenko
5b0645d718 Drop old python versions 2020-03-19 22:17:09 +02:00
Sergey Tereschenko
3d9ee427eb build(ci): clean tox envs 2020-03-19 22:16:37 +02:00
partizan
6674ca587e
Move chat badge 2020-03-19 21:49:29 +02:00
partizan
6b234b255f
Merge pull request #543 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.rst
2020-03-19 21:42:49 +02:00
The Gitter Badger
90888013be Add Gitter badge 2020-03-19 19:41:40 +00:00
Sergey Tereschenko
fad3d973c7 Merge branch 'master' of github.com:deschler/django-modeltranslation 2020-03-12 23:41:25 +02:00
Sergey Tereschenko
a5b402c516 feat: Use poetry as venv manager 2020-03-12 23:41:16 +02:00
partizan
37e65269dd
Merge pull request #541 from ThijsBoehme/patch-1
refactor: Use `gettext_lazy` instead of deprecated ugettext_lazy
2020-03-10 13:58:42 +02:00
Thijs Boehme
6f28721fb7 Change ugettext_lazy to gettext_lazy
Other instances which were skipped in the first commit
2020-03-06 16:37:55 +01:00
Thijs Boehme
1bff76dc02
Update to use gettext_lazy
The use of `ugettext` and variants is deprecated in Django 3.0 and to be removed in Django 4.0.
See more here: https://code.djangoproject.com/ticket/30165
2020-03-04 12:24:05 +01:00
partizan
e6acda12f9
Merge pull request #540 from hdk5/hdk5-patch-1
Fix TypeError in admin when all model fields are read-only
2020-02-27 09:10:05 +02:00
hdk5
1b95b7d679
Fix TypeError in admin when all fields are read-only 2020-02-26 16:18:51 +03:00
Sergey Tereschenko
53d2fc9a9c Prepare release 0.14.4 2020-02-18 08:13:13 +02:00
Sergey Tereschenko
99bd7ce81e Merge remote-tracking branch 'origin/538-fix-manager-inheritance' 2020-02-18 08:11:21 +02:00
Sergey Tereschenko
a3ab629ab3 Fix manager inheritance (ref #538) 2020-02-17 22:21:53 +02:00
Sergey Tereschenko
ef2e188e36 Prepare release 0.14.3 2020-02-14 17:34:04 +02:00
Sergey Tereschenko
da5d8c91ba fix flake8 warnings 2020-02-14 17:27:12 +02:00
Sergey Tereschenko
ce9b5e3c84 Cleanup 2020-02-14 17:22:27 +02:00
partizan
4bb1cb5f85
Merge pull request #537 from Sult/issue-445-base_manager-uses-default_manager
base_manager shouldnt be the same as default_manager (close #455)
2020-02-14 17:19:15 +02:00
Hans de Jong
0df9e5129d updated test and also vlaidate that the correct manager is used 2020-02-13 09:14:48 +01:00
Hans de Jong
061ddca19e base_manger now working based on super 2020-02-13 07:56:54 +01:00
Hans de Jong
80731961fa The issue was that base_manager method from django is a cached property that creates a manager each time it is required. So overwriting didnt work. Now i am far from a metaclass expert and im sure this can be done neater, however this is all the time i have at the moment. Improvements shouldnt be too hard now the issue has a (ugly) fix. Also added a short test, but i am used to pytest, so forgive me for the ugly manager solution. Hope this can help you out 2020-02-12 14:38:37 +01:00
Sergey Tereschenko
bb34e8cf96 Prepare release 0.14.2 2020-01-16 13:15:41 +02:00
partizan
309397e837
Merge pull request #536 from buczek/fix-full-clean
Don't leak into current language from .clean_fields()
2020-01-16 13:12:58 +02:00
Donald Buczek
2c9669efd8 Don't leak into current language from .clean_fields()
Django uses .clean_fields() to verify the values of all fields of an
instance, e.g. after the instance has been updated from a form view.

.clean_fields() essentially walks over the fields in the model, reads
the current values, verifies and normalizes them, and writes them
back [1].

With model-translations activated, this can leak values from a fallback
language into the current language of the session, if the value for the
current language has been set to an empty value from a translation aware
application or form.

Example:

- current language is "en"
- fallback languages are "en", "de"
- web form wants to set "title_de" to "Schnapsidee" and leave
    "title_en" empty

After the form is submitted, Django calls .clean_fields() which
processes the field "title" first

- reads value of "title" - which gives "Schnapsidee" from
    "title_de" by the fallback mechanism of Modeltranslations
- writes this value back to "title", which sets "title_en"
    as a side effect.

Bugs have been reported at [2], [3] and [4]

Disable the implicit setting of the translation field from the
translated field ( Rule 2 of [5] ) during .clean_field() processing.

[1] bf77669453/django/db/models/base.py (L1229)
[2] https://github.com/deschler/django-modeltranslation/issues/382
[3] https://github.com/infoportugal/wagtail-modeltranslation/issues/247
[4] https://github.molgen.mpg.de/molgen/mpicms/issues/15
[5] https://django-modeltranslation.readthedocs.io/en/latest/usage.html#rules-for-translated-field-access
2020-01-16 11:58:18 +01:00
partizan
426fa2155a
Merge pull request #535 from tiktuk/patch-1
Fixed formatting of version table
2020-01-14 14:48:09 +02:00
Tuk Bredsdorff
9cee57bba9
Fixed formatting of version table 2020-01-14 13:46:59 +01:00