wookkl
a0aeb58b47
feat: Support F and Concat expressions in annotate()
...
Refs #735
2024-05-24 16:17:30 +03:00
Hugo Defrance
bdee9ff5b9
Feat: Add build_lang helper in utils
2024-05-16 12:29:07 +03:00
Serhii Tereshchenko
d7a4d0b841
chore: Apply ruff format
2024-05-16 12:23:19 +03:00
wookkl
b016af5d4a
fix: Remove deprecated test config starting from Django 5.0
2024-05-16 12:21:59 +03:00
Victorien
a9e95e8c78
feat: Add types
...
Refs #716
2024-04-04 11:27:00 +03:00
Serhii Tereshchenko
8742ad3554
style: Reformat files (use double quotes)
2023-11-25 13:48:57 +02:00
Serhii Tereshchenko
2061f6c264
fix(ci): Replace flake8 with ruff
2023-10-15 15:53:57 +03:00
Sergei Maertens
2657de7c2e
feat: Support language-specific field defaults
...
Refs #700 , #698
2023-09-08 08:59:58 +03:00
Sergei Maertens
b189326543
chore: Add missing migrations for tests app/models ( #699 )
2023-09-05 10:12:33 +03:00
Andrei Shabanski
d86c6defc8
feat: extend update_fields with translation fields in Model.save() ( #687 )
2023-07-16 11:04:27 +03:00
Benedikt Willi
b3debe82d4
Add support for JSONField in modeltranslation/fields.py and update_translation_fields command and add tests for JSONField support.
2023-06-01 22:33:45 +02:00
Serhii Tereshchenko
d315a90e9b
chore: Update tests
2023-05-30 18:07:34 +03:00
Serhii Tereshchenko
86cfa3f913
chore: Sort imports
2023-05-30 17:51:20 +03:00
Serhii Tereshchenko
dc58cb8106
chore: Apply black
2023-05-30 17:42:28 +03:00
Serhii Tereshchenko
3c6cbd59a7
chore: Update old syntax
...
pyupgrade --keep-percent-format --py38-plus modeltranslation/**/*.py
2023-05-30 17:38:48 +03:00
Serhii Tereshchenko
ec69a82a36
chore: Split tests
2023-05-30 17:37:46 +03:00
Benedikt Willi
e5fb74c520
Added missing new line at the end of test.yml, use implicit call to parent class, added another testcase where created is True.
2023-05-30 14:19:49 +02:00
Benedikt Willi
ac905c01c8
Add update_or_create method to MultilingualQuerySet and add test for it in ModeltranslationTest class.
2023-05-30 12:07:18 +02:00
Serg Tereshchenko
f0fb6ebd8d
chore: Update formatting
2023-02-09 10:38:43 +02:00
Stefan Hammer
d65ff60007
fix: Fix handling of expressions in values()/values_list()
...
This basically duplicates some code from django's implementation.
Refs #670
2023-02-08 16:53:35 +01:00
Gabriele Baldi
f69e3172bc
feat: Add support for ManyToManyFields 🧑🤝🧑 ( #668 )
2023-01-27 15:05:18 +02:00
Serg Tereshchenko
4f690ab772
chore: Apply black
2022-11-22 16:40:51 +02:00
Philipp
fcfbd5ce05
fix: Fix admin widget for fk fields ( #662 )
...
Refs #660
2022-11-22 16:21:00 +02:00
Michal Dabski
09ce0e076b
fix: Fix unexpected ordering after values()/values_list() followed by order_by().
...
Refs #655
Refs #656
2022-11-07 09:24:04 +00:00
Tim Gates
ab79ec8512
docs: Fix a few typos ( #651 )
...
There are small typos in:
- docs/modeltranslation/admin.rst
- docs/modeltranslation/installation.rst
- docs/modeltranslation/related_projects.rst
- modeltranslation/admin.py
- modeltranslation/management/commands/sync_translation_fields.py
- modeltranslation/tests/models.py
Fixes:
- Should read `similar` rather than `similiar`.
- Should read `whose` rather than `whos`.
- Should read `original` rather than `orginal`.
- Should read `missing` rather than `missings`.
- Should read `consistent` rather than `consistant`.
- Should read `compatibility` rather than `compatibiliy`.
Signed-off-by: Tim Gates <tim.gates@iress.com>
2022-09-03 21:56:06 +03:00
Serg Tereshchenko
89abad769c
cleanup: Remove six from tests; Remove get_query_set; Remove unused has_custom_queryset
2022-07-13 19:49:54 +03:00
Serg Tereshchenko
426a8f5ff6
cleanup: Remove obsolete skipUnless
2022-07-13 19:39:16 +03:00
Serg Tereshchenko
480cdcfaf9
refactor: Use pytest assertions
...
This was mostly converted automatically with
pipx run unittest2pytest modeltranslation/tests -w
And some manual fixes.
2022-07-13 19:37:44 +03:00
Serg Tereshchenko
d3e2396be6
feat(dev): Migrate to pytest
2022-07-13 19:02:47 +03:00
Serhii Tereshchenko
39bbe821b3
feat: Support named argument for values_list ( #644 )
...
Co-authored-by: serdtsekol <serdtsekol@gmail.com>
2022-07-11 00:00:24 +03:00
Suyeol Jeon
defc37c7a5
fix: Do not include annotation fields when selecting specific fields ( #634 )
2022-05-04 09:25:53 +03:00
Suyeol Jeon
6f2688f52c
fix: Preserve annotate() fields in queryset ( #633 )
2022-04-29 13:26:15 +03:00
Serg Tereshchenko
25b6011a1f
style: Apply black
2021-09-18 10:55:39 +03:00
Serg Tereshchenko
f200bf1951
chore: Fix linter error
2021-04-15 21:40:26 +03:00
Antoine Fontaine
eaf613be17
fix: Fixed .latest() ORM method with django 3.2
...
Co-authored-by: Serg Tereshchenko <serg.partizan@gmail.com>
Refs #591
2021-04-15 21:38:56 +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
Grégoire Deveaux
205a8f6c2f
Fix: add NewMultilingualManager __eq__()
2020-04-21 16:58:21 +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
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
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
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
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
Sergey Tereschenko
1b36bff9ec
use tests for django 3
2019-10-27 19:00:14 +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
Dirk Groten
2a92d6c7b4
Fix flake8 formatting errors
2019-10-20 20:14:52 +02:00
Dirk Groten
f42d3404e2
Added test to make sure inherited models with no custom manager still have the correct default manager
2019-10-20 20:06:44 +02:00
Dirk Groten
50a7868fa7
Documented tests better
2019-10-20 19:24:06 +02:00
Dirk Groten
b6d4cf81d3
Test to check the default manager after registering model for translation
2019-10-20 19:18:27 +02:00