Commit graph

91 commits

Author SHA1 Message Date
Serhii Tereshchenko
d0b8e707ec chore: Remove code for old django versions 2024-06-01 10:37:33 +03:00
Serhii Tereshchenko
9d9a2ab8b0 chore: Update code for minumum python 3.9 2024-06-01 10:37:33 +03:00
Serhii Tereshchenko
67d26e6f63
chore: Use poetry deps for testings (#741)
Also, add lsp optional group to install python-lsp-server
2024-06-01 09:03:48 +03:00
Serhii Tereshchenko
cdf05b9b6c chore: Update ruff 2024-05-26 07:59:54 +03:00
Serhii Tereshchenko
b97c22c197
fix(types): Fix fields type (#739)
Most likely, this won't cause any troubles for standard use-cases. But, if you used `get_options_for_model()` and `.fields` from this instance, you need to rename it to `.all_fields`.

BREAKING CHANGE: Rename `fields` (dict with set of TranslationField) to `all_fields`, on the TranslationOptions instance.
2024-05-26 07:29:52 +03:00
wookkl
a0aeb58b47
feat: Support F and Concat expressions in annotate()
Refs #735
2024-05-24 16:17:30 +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
Andrei Shabanski
d86c6defc8
feat: extend update_fields with translation fields in Model.save() (#687) 2023-07-16 11:04:27 +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
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
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
Maksudul Haque
4927b6cb63
Make Context Managers (fallbacks and auto_populate) Thread Safe (#657) 2022-11-08 14:13:17 +00: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
Serg Tereshchenko
86b67c271e fix: Remove six (old compat layer for python2) 2022-07-13 23:14:28 +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
Serg Tereshchenko
89be420540 chore: Move selects_all 2022-05-04 09:26:50 +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
c65adb058d fix(MultilingualQuerySet): Make _clone signature match default django _clone
Refs #483
2021-05-29 14:29:40 +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
Pieter Goetschalckx
fd137d8ae9
Fix Django 3.2 compatibility (#590)
feat: Add Django 3.2 compatibility

order_by in update_translation_fields.py:84 can be removed after next django 3.2.x is released (https://code.djangoproject.com/ticket/32645).
2021-04-15 08:51:08 +03:00
Simon Meers
e67d3ee3c5 correct FieldDoesNotExist exception import; will break in dev Django release 2020-05-06 09:28:36 +10:00
Misha Kalyna
5505208003 explicitly install and import six (which was removed from Django 3.0) 2019-10-05 21:07:08 +02:00
Sergey Tereschenko
685a52f2c9 clean unsupported django version fallback 2019-02-12 23:19:19 +02:00
Sergey Tereschenko
bc8443dfdf cleanup NEW_RELATED_API, NEW_LOOKUPS
- fixed Col import
2019-02-12 23:17:34 +02:00
Sergey Tereschenko
ecffd48393 clean old meta api 2019-02-12 22:43:15 +02:00
Sergey Tereschenko
5bbd406f30 clear legacy admin.util import 2019-02-12 22:42:12 +02:00
Sergey Tereschenko
08b0239fff fix linter warnings 2019-02-12 22:09:03 +02:00
Dirk Eschler
23ba19bec0
Merge pull request #368 from virgilio/master
Add primary support to DISTINCT statement
2018-01-26 12:57:23 +01:00
AbdolHosein
fab3bd7cc7 Removes extra blank lines 2018-01-02 14:25:11 +03:30
AbdolHosein
dbb372137b Removes unwanted spaces 2018-01-02 14:17:02 +03:30
AbdolHosein
a1ae1d1aa3 Fixes the fail issue on test progress 2018-01-02 14:11:16 +03:30
AbdolHosein
631347da74 Patches the issue with the Django 2.0 release on. Fixes #436 2018-01-02 13:38:23 +03:30
Dirk Eschler
00fc7f1804
Merge pull request #398 from btoueg/patch-1
Fix order_by with expression
2017-12-20 21:53:05 +01:00
Florian Demmer
4ec3a4b4b0
Fix import with django < 1.7 2017-09-18 01:23:31 +02:00
Florian Demmer
8457782380
Get related model from field's path_info
related_model is a cached property, that contains a string
instead of the model eg. when overriding the default User model.
2017-09-18 01:23:06 +02:00
Tocho Tochev
74929c2055 Fix reset of .select_related 2017-07-25 13:31:57 +03:00
Mariusz Felisiak
a7b484d10a
Used Meta.base_manager_name on model instead of Manager.use_for_related_fields. 2017-06-23 21:10:23 +02:00
Mariusz Felisiak
5f66a44649
Removed unused code.
Unused since cc214e3c66.
2017-06-23 06:49:38 +02:00
Benjamin Toueg
ff189d68f5 Fix .defer(None) 2017-06-01 17:21:39 +02:00
Benjamin Toueg
0b7d356f23 Fix .select_related(None) 2017-06-01 17:21:39 +02:00
Benjamin Toueg
60c632fc6a Fix order_by with expression
Fix #375
2017-06-01 17:20:06 +02:00
Jacek Tomaszewski
2f227a45af Fix values_list + annotate combo bug (close #374). 2016-06-01 19:02:30 +02:00
Virgilio Santos
b3cd27aeea query options: add primary support distinct statement 2016-03-23 18:35:47 -03:00
Jacek Tomaszewski
8320fc8a5a Add Django 1.9 support (ref #349). 2015-12-06 18:48:17 +01:00
Venelin Stoykov
a39dee2b78 Fix FallbackValuesListQuerySet.iterator
This will fix generated result when creating valueslist queryset
with annotation and flat=True

Fixes #324
2015-09-03 10:04:54 +03:00
Lukas Lundgren
a6511bca83 Handle annotation fields when using values_list 2015-07-01 11:22:33 +02:00