Commit graph

81 commits

Author SHA1 Message Date
Benedikt Willi
f09ea0e472 Fix compatibility issues with django-modeltranslation by modifying manager mixins
- Added a new class `_GenericMixin` to serve as a runtime placeholder for `Generic[ModelT]`. This change prevents `TypeError` during `__class__` assignments, which was an issue when mixins inherited from `Generic[T]` at runtime.
- All manager mixins have been updated to inherit from `_GenericMixin` instead of `Generic[ModelT]`. This ensures compatibility with `django-modeltranslation`.
- Introduced regressions tests to confirm that the manager instances support `__class__` reassignment without issues. Tests were added for `SoftDeletableManager`, `InheritanceManager`, `QueryManager`, and `JoinManager`.

Closes GH-#636.
2025-12-15 11:38:33 +01:00
Nick Prat
e777819073
Fixed an infinite recursion bug when deleting models related to a tracked model with a ForeignKey (#620)
* Fixed an infinite recursion bug when deleting a model, that has a reverse relationship to a tracked model with SET_NULL on_delete

---------

Co-authored-by: Napat Ch <napat@thevcgroup.com>
2025-04-03 19:58:57 +02:00
Jelmer
f39c975e8b
Merge branch 'master' into ptbr-translations 2024-03-21 08:36:00 +01:00
meanmail
5663374890 Don't use post_init signal for initialize tracker 2024-03-11 17:50:12 +01:00
Guilherme Martins Crocetti
055932bb8b
feat(locale): Add translations for pt_BR 2023-08-01 11:26:41 -03:00
joeriddles
7e1437b18a Add joeriddles to AUTHORS.rst 2023-01-26 13:25:51 -08:00
John Vandenberg
70b949cd2c
Merge branch 'master' into spanish_translation 2022-03-14 10:36:04 +08:00
John Vandenberg
53b23c84c5
Merge pull request #473 from Sicilia04/master
Adds French translation
2022-03-14 10:34:06 +08:00
Matthieu Rigal
6d4112e8ce
Fix performance regression: avoid pickling the whole instance when deepcopying fields on Django 3.1+ (#500)
* test: Add failing test for #gh-498

* fix: Fix performance regression on FileTracker for FileField on Django 3.1+
2021-10-09 21:30:12 +06:00
Nafees Anwar
a56d07cd68 Added urlsafe token field 2021-04-30 21:40:39 +05:00
Florian Alu
3a1bcc7ccb Add French translation 2021-01-11 11:57:01 +01:00
H. Buğra Aydın
2ad67e77b1
Add status_changed field to upload_fields parameter during save if status field is present (#441)
* implementation/tests

* naming problem
2020-09-17 20:34:57 +06:00
Craig Anderson
b7a160936f Add available_objects soft deletable model manager. Emit deprecation warning when using objects soft deletable manager. 2020-08-25 16:40:09 +06:00
Enrique Matías Sánchez (Quique)
c6ce8fea25 Add Spanish translation 2020-03-29 11:31:31 +02:00
Rémy HUBSCHER
8af8cf269c
Prepare 4.0.0 release. 2019-12-11 15:47:18 +01:00
asday
488be3ff01 Updated documentation and bumped minor version. 2019-08-19 23:02:43 +01:00
Emin Bugra Saral
f5d4e5ce2b Update changes and authors 2019-05-20 19:45:51 +02:00
Asif Saif Uddin
25dde41418
Merge pull request #360 from marfyl/master
Add UUIDModel and UUIDField
2019-05-16 05:45:53 +06:00
Remy Suen
c4a252d1fb Explain usage of timeframed model manager in the documentation (#365)
* Provide a sample for using the timeframed manager

Signed-off-by: Remy Suen <remy.suen@gmail.com>

* Update CHANGES.rst file

Signed-off-by: Remy Suen <remy.suen@gmail.com>

* Update AUTHORS.rst file

Signed-off-by: Remy Suen <remy.suen@gmail.com>
2019-03-20 15:07:00 +06:00
JMP
430866abfa Update authors file 2019-02-26 17:37:24 +01:00
Reece Dunham
3be02d3001
Update AUTHORS.rst 2019-01-11 10:04:43 -05:00
Reece Dunham
1c7947b5e2
Merge branch 'master' into master 2019-01-11 10:03:50 -05:00
Zach Cheung
af1824e200 fix conflict 2019-01-11 17:26:06 +08:00
Daniel Andrlik
25743141bc Ensure TimeStampedModel modified equals created on initial creation. (#319)
*  Ensure TimeStampedModel modified equals created on initial creation.

Add logic to AutoLastModifiedField which checks to see if the associated created field of the correct cField class type is also present. If the instance has not yet been saved (missing a pk), then set the value to modified to be equal to created.

Fixes #247

📚 Update changes and authors list related to changes.

* 🚑 Set TimeStampedModel modified to be equal to created during first save.

If instance does not yet have a pk, before defaulting the last modified to the current time, iterate over the the fields of the model, and instead use whatever value is found in the first occurance of the AutoCreatedField.

Fixes #247

* Move changelog up to unreleased section.
2018-12-08 12:23:04 +06:00
Jonathan Sundqvist
2cb773372d Add a JoinManager that helps with performance (#351)
* Add the join manager + tests

* Documentation for join manager

* Use order_by for consistent tests

* Use postgres instead sqlite for tests for better reliability

* Fix coverage

* Drop django 1.8
2018-11-25 20:18:23 +06:00
Zach Cheung
300209007b add Simplified Chinese translations 2018-10-23 15:38:04 +08:00
Lucas Wiman
2e92877910 Merge branch 'master' into django-1.11-compatibility 2018-07-02 11:21:48 -07:00
Martey Dodoo
e750fc7408 Fix AUTHORS.rst formatting.
Add pipe character at the beginning of each line so that all authors are
not concatenated together when ReStructuredText is parsed. Add Martey to
AUTHORS as well.
2018-06-30 16:18:16 -07:00
Lucas Wiman
98a1366608 Merge branch 'defer-has-changed' into django-1.11-compatibility 2018-06-21 12:52:33 -07:00
Lucas Wiman
be1a7d9281 Update AUTHORS and CHANGES.
As far as I can tell, no changes to documentation is required.
2018-06-21 12:41:42 -07:00
Jack Cushman
d34043fd25 Avoid fetching deferred fields in has_changed 2018-02-10 10:53:36 -05:00
Germano Massullo
3422547483
Update AUTHORS.rst 2018-01-19 10:47:56 +01:00
Hanley
0a809df4da make InheritanceIterable inherit from ModelIterable instead of BaseIterable 2017-06-23 09:51:32 -04:00
Carl Meyer
68bc61e825 Update changelog and AUTHORS. 2016-11-21 11:36:25 -08:00
Radosław Ganczarek
9e90dde2e8 Add SoftDeletableModel 2016-09-12 15:11:34 +02:00
Alexey Evseev
9ee6065f81 Support Django 1.10 deferred FileField with FieldTracker 2016-09-08 18:00:48 +03:00
Artis Avotins
d1337d5a7c Fixed a bug with Django >= 1.9 where values_list was called on
InheritanceQuerySet with `select_subclasses` applied as strings
raised AttributeError exception.

Adds a new test case `test_dj19_values_list_on_select_subclasses`
2016-05-25 18:58:03 +02:00
Mike Bryant
ff3f8e5546 Use all the fields to determine _id variants. Fixes #214
If a tracker is defined on an inherited model, where the parent has a ForeignKey,
the tracker will now correctly determine that the field_map takes `fk` -> `fk_id`
2016-03-31 15:45:19 +01:00
Karl WnW
ce8deed5ca Fix _clone signature for Django<1.9
InheritanceQuerySetMixin._clone signature conflicts with django
ValuesQuerySet._clone code which calls super like this:
"c = super(ValuesQuerySet, self)._clone(klass, **kwargs)"
2015-11-02 17:52:43 +01:00
Carl Meyer
b06fa8c752 Update AUTHORS and changelog. 2015-10-28 17:16:50 -06:00
Philipp Steinhardt
8bd2f8bcda * update AUTHORS.rst and CHANGES.rst 2015-07-02 14:30:09 +02:00
Carl Meyer
7012e16cc8 Add Dmytro Kyrychuk to AUTHORS file. 2015-01-26 22:28:55 -07:00
Carl Meyer
b54d4652a3 Update AUTHORS/changelog. 2014-10-29 16:20:02 -06:00
bboogaard
ac0957e3ec Update AUTHORS.rst and CHANGES.rst 2014-08-19 10:42:41 +02:00
Rodney Folz
8530568692 Add me to AUTHORS 2014-04-25 13:42:05 -07:00
Carl Meyer
f63696a93e Update AUTHORS and changelog. 2014-03-19 22:27:56 -06:00
Michael van Tellingen
6ffae1ad8f Add support for deferred fields in the FieldTracker 2014-03-01 13:34:17 +01:00
Carl Meyer
9a78b7fbec Update AUTHORS and changelog. 2014-02-19 15:42:37 -07:00
Carl Meyer
15ad7e1d93 Update AUTHORS and changelog. 2014-01-25 17:40:25 -07:00
Carl Meyer
67804488ae Reorder AUTHORS.rst. 2014-01-25 17:26:51 -07:00