Commit graph

64 commits

Author SHA1 Message Date
Romain G
63e5c59c66 Simplify test models + make it compatible for old Django versions 2017-01-09 19:16:09 +00:00
Romain G
679af01f26 Add fix + tests for abstract manager inheritance issue with StatusModel 2017-01-09 19:02:59 +00:00
Bruno Alla
0efaad1218 Fix issue when extend QuerySet and Manager - fixes #249 2017-01-05 14:29:35 +00:00
romgar
e9d57e60fe Add test to demonstrate issue #241 2016-11-18 00:24:57 +00: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
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
jarekwg
01514db83c Update MutableField for 1.9 2015-10-29 08:12:35 +11:00
jarekwg
2824ec2e48 Remove PassThroughManager
As of Django 1.7, QuerySet.as_manager() achieves the same result.
2015-10-29 00:10:28 +11:00
Ryan Senkbeil
617ec2af01 Fix InheritanceManager when the model has a self reference.
Otherwise, we reach max recursion depth.
2014-02-19 15:28:01 -06:00
Carl Meyer
26f4d7c8f5 Silence BooleanField default warnings. 2014-01-25 17:11:26 -07:00
Thomas Schreiber
910bcc7830 backwards comptatible get_queryset, for Django < 1.6 2013-12-31 17:30:11 +01:00
Thomas Schreiber
5ae92dba27 fix get_query_set deprecationwarnings 2013-12-30 21:42:52 +01:00
Alejandro Varas
452ac5cd21 Added choices_name parameter to StatusField 2013-11-14 16:12:31 -03:00
Keryn Knight
ae71f9080e Tests for #59 - a manually specified OneToOne should behave
the same as an implicit one.
2013-10-26 15:44:01 +01:00
Keryn Knight
1de58474c0 Implemented #44 - passing Model classes to InheritanceManager's select_subclasses 2013-10-21 21:47:58 +01:00
Filipe Ximenes
3d82ec89b4 only accepting iterables to the when field 2013-10-11 08:24:00 -03:00
Filipe Ximenes
e3450977bd adding 'when' parameter to MonitorField 2013-10-11 00:08:38 -03:00
Carl Meyer
4b6a800050 Fix bug with child/grandchild select_subclasses in Django 1.6+; thanks Keryn Knight. 2013-09-20 10:04:10 -06:00
Trey Hunner
2679f6114b Merge branch 'silonov-json_fields_support'
Conflicts:
	CHANGES.rst
	model_utils/tests/tests.py
2013-08-17 01:40:09 -07:00
silonov
f20e723952 Added more general mutable fields support instead of json-specific 2013-08-11 19:32:45 +04:00
Mikhail Silonov
8c6f343111 Added JSON Fields support 2013-08-08 18:02:12 +04:00
Eran Rundstein
5687d9836d create basic failing test case for inherited models and tracker 2013-06-06 13:24:43 +00:00
Trey Hunner
aaf2219013 Add tests for tracking non-field attributes 2013-06-03 12:08:01 -07:00
Carl Meyer
44b0e42dd1 Merge branch 'master' into fk-fix
* master:
  Remove misinformation from changelog; oops.
  Tweak AUTHORS and changelog.
  PassThroughManager calls superclass `get_query_set`.
  Update AUTHORS and changelog.
  Fix tox.ini so runtests.sh works.
  Test and fix for second grandchild bug.
2013-06-03 11:54:46 -06:00
Andy Freeland
7e381179e4 PassThroughManager calls superclass get_query_set.
As discussed in #31, PassThroughManager and
PassThroughManager.for_queryset_class() would ignore the superclass
version of `get_query_set`.
2013-05-26 16:04:47 -04:00
Trey Hunner
6532784acd Create FieldTracker that mirrors ModelTracker 2013-05-23 12:50:34 -07:00
Trey Hunner
a141063f34 Add tests for ForeignKey fields with ModelTracker 2013-05-23 12:31:20 -07:00
Alex Orange
1e84465276 Test and fix for second grandchild bug.
Bug is, second grandchild of a given child will get cast to the child
rather then the grandchild.
2013-05-21 14:23:23 -06:00
Trey Hunner
2769e79796 Fix BooleanField default (for Django trunk) 2013-03-27 22:43:21 -07:00
Felipe Prenholato
cce804da4e Assert that StatusField respects default arguments. 2013-02-21 17:08:15 -03:00
Trey Hunner
b1979a52b3 Add tests for multiple model trackers 2013-02-18 20:06:52 -08:00
Trey Hunner
676424e388 Move ModelTracker to tracker module 2013-02-18 16:21:14 -08:00
Trey Hunner
c528a347e0 Add ModelTracker with tests 2013-02-16 14:52:31 -08:00
Carl Meyer
93a1a44ee7 Updates to multi-level support for InheritanceManager. 2013-02-01 22:38:14 -07:00
Ivan Virabyan
937b3e018f Support for multi-level inheritance in InheritanceManager 2013-01-31 18:27:16 +04:00
Carl Meyer
246fb81813 Revert addition of UpdateOrCreateMixin; reaches 100% test coverage. 2013-01-27 14:16:58 -08:00
Carl Meyer
6ae66e0153 Removed a bunch of deprecated code. 2013-01-27 13:30:31 -08:00
Antti Kaihola
c83c14c46f Added an UpdateOrCreateMixin for creating custom managers and querysets which have an .update_or_create() method (see Django ticket #3182). 2012-06-08 16:47:28 +03:00
Ryan Kaskel
6afa9d566d Add convenience method to PassThroughManager. 2011-12-04 13:57:16 +00:00
Carl Meyer
b7c5a59390 Fixed using SplitField on an abstract base model class. 2011-04-28 20:59:52 -05:00
Carl Meyer
5c5abdce23 Added use_for_related_fields=True to InheritanceManager. Fixes #8. Thanks munhitsu for the report.
Note that the tests added for this feature pass even without the change to
InheritanceManager, because use_for_related_fields is broken in Django and
always acts as if True for reverse FKs and M2Ms.
(http://code.djangoproject.com/ticket/14891)
2011-04-16 16:19:55 -05:00
Carl Meyer
7c19b761e2 Merged in fix for Django 1.1 recursion error from Paul McLanahan. 2011-03-30 10:20:37 -04:00
Paul McLanahan
d8798fb784 Fixed a recursion error in Django 1.1 2011-03-29 21:57:49 -04:00
Carl Meyer
36b99304c2 Merged in PassThroughManager from Paul McLanahan. 2011-03-29 13:10:50 -04:00
Carl Meyer
e418cc909a Fixed issue #6, bug with InheritanceManager and descriptor fields (e.g. FileField).
Thanks zyegfryed for the fix and sayane for tests.
2011-03-29 12:47:25 -04:00
Paul McLanahan
04c848e8c7 Added tests for PassThroughManager. 2011-03-09 14:44:10 -05:00
Carl Meyer
ac36cbf56c Added InheritanceManager, contributed by Jeff Elmore. 2010-11-23 12:48:23 -05:00
Carl Meyer
a2c67934ed additional test, docs cleanup 2010-10-05 08:59:25 -04:00
Carl Meyer
1d4613e807 make tests compatible with pre-1.2 2010-09-24 10:30:58 -04:00