Commit graph

944 commits

Author SHA1 Message Date
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
partizan
0f79d852a5
Merge pull request #534 from 21adrian1996/feature/replace-force-text
replace force_text to support django 3
2020-01-08 09:07:46 +02:00
Adrian Berger
a7c0482b94 replace force_text to support django 3 2020-01-07 11:13:45 +01:00
partizan
68bd9dcf36
Merge pull request #532 from AliMirlou/patch-1
Docs: Fix some punctuation errors and Clean code
2019-12-31 09:48:56 +02:00
Ali Mirlou
4954d89a10
Docs: Fix some punctuation errors and Clean code 2019-12-30 22:39:26 +03:30
Sergey Tereschenko
686e020974 Change permissions to 644 2019-12-18 00:30:13 +02:00
partizan
facd882356
Merge pull request #531 from portedison/master
fix for nested inlines
2019-12-12 10:36:42 +02:00
Piet van Leeuwen
4797c45385 fix for nested inlines, seems to group items inside empty-form, and then again when adding another 2019-12-12 10:05:05 +13:00
Sergey Tereschenko
ba98a0d0f0 Prepare release 0.14.1 2019-12-06 00:42:41 +02:00
Sergey Tereschenko
b24b750b69 fix requirements syntax (close #530) 2019-12-06 00:40:48 +02:00
Sergey Tereschenko
ef34601622 Prepare 0.14.0 release 2019-11-14 12:11:56 +02:00
Sergey Tereschenko
506986400f Merge branch 'master' of github.com:deschler/django-modeltranslation 2019-11-14 12:07:21 +02:00
partizan
15f39ac458
Merge pull request #528 from keuko/master
Fix failing tests when local migrations are used (Fixes: #527).
2019-11-13 14:47:03 +02:00
Michal Arbet
7e6f912c6f Fix failing tests when local migrations are used (Fixes: #527).
The following tests issues are adressed in this patch:

- Settings are changed so that local tests.auth_migrations are used
  instead of django.contrib.auth.migrations
- Distributed django.contrib.auth.migrations are copied to
  tests.auth_migrations for tests
- All migrations are deleted from tests.auth_migrations on teardown
2019-11-13 13:25:59 +01:00
partizan
7bb8194ac9
Merge pull request #485 from fdemmer/update_translation_fields
Add app_label and model_name arguments to update_translation_fields command
2019-11-08 10:25:52 +02:00
Sergey Tereschenko
5b230d2c36 Fix extra tab lang switcher in stackedinline (close #522) 2019-10-27 22:26:19 +02:00
Sergey Tereschenko
1b36bff9ec use tests for django 3 2019-10-27 19:00:14 +02:00
Sergey Tereschenko
851bff4cb6 fix related fields translation in django 3 2019-10-27 18:58:53 +02:00
Sergey Tereschenko
74d2b0688a Merge branch 'master' of https://github.com/mvbrn/django-modeltranslation into django-3 2019-10-27 18:57:00 +02:00