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
9dc3dacabf
Fix FieldTracker's has_changed (fixes gh-51)
...
The FieldTracker has_changed method no longer returns True for any input
when the instance is unsaved and no longer raises a FieldError for
fields after the first save. The original ModelTracker behavior is
maintained.
2013-05-24 22:22:20 -07:00
Trey Hunner
d28f3860cf
Change FieldTracker `current` for unsaved model
...
Return None values instead of an empty dict
2013-05-23 16:38:12 -07:00
Trey Hunner
4bae3e999b
Fix foreign key tests for FieldTracker
2013-05-23 13:16:49 -07:00
Trey Hunner
6532784acd
Create FieldTracker that mirrors ModelTracker
2013-05-23 12:50:34 -07:00
Trey Hunner
97e0f5edbf
Change failing test to pass for ModelTracker
2013-05-23 12:34:15 -07:00
Bojan Mihelac
ea899d17a0
Added test_number_of_queries in ModelTrackerTestCase
2013-05-23 12:31:21 -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
Carl Meyer
216d0b7095
Fix GH-41: re-add get_FOO_display method to models with StatusField.
2013-05-02 11:33:48 -06:00
Trey Hunner
c2f3bd8a77
Fix deprecated assertion methods in tests
2013-04-12 17:13:36 -07:00
Trey Hunner
396bb7ac3f
Remove with_statement import (was needed for 2.5)
2013-04-12 17:13:36 -07:00
Trey Hunner
f7f7cc0953
Fix repr tests for Python 2 (no string comparison)
2013-04-12 17:13:31 -07:00
Trey Hunner
4f2673e6a4
Fix str/unicode problems in Python 3
...
Changes:
- Use unicode_literals from the future for Python 2.6.5+
- Use six's text_type for proper unicode use in Python 2/3
2013-04-12 14:16:42 -07:00
Trey Hunner
81c7e40e60
Fix iterator/list problems for Python 3 support
2013-04-12 14:16:42 -07:00
Carl Meyer
4ee0c39db3
Add tests for StatusField no_check_for_status.
2013-04-10 12:52:53 -06:00
Trey Hunner
4156fa40e9
Add test for ModelTracker before first model save
2013-03-27 16:59:42 -07:00
Trey Hunner
98016dbd50
ModelTracker: check DB after using update_fields
2013-03-27 16:59:42 -07:00
Trey Hunner
d9c415c5cd
Add ModelTracker test for save(update_fields=[...])
2013-03-27 16:59:42 -07:00
Felipe Prenholato
cce804da4e
Assert that StatusField respects default arguments.
2013-02-21 17:08:15 -03:00
Trey Hunner
cf153f3c06
Add test for ModelTracker descriptor on class
2013-02-18 20:13:39 -08:00
Trey Hunner
b1979a52b3
Add tests for multiple model trackers
2013-02-18 20:06:52 -08:00
Trey Hunner
7ac6e8a81c
Add tests for ModelTracker.current method
2013-02-18 17:33:26 -08:00
Trey Hunner
c528a347e0
Add ModelTracker with tests
2013-02-16 14:52:31 -08:00
Carl Meyer
579abf8e66
Fix calling create() on a related manager based on PassThroughManager.
2013-02-12 14:05:31 -07:00
Carl Meyer
cf2c97b620
Avoid overriding prior calls to select_related in select_subclasses.
2013-02-01 22:53:11 -07: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
Carl Meyer
a76006a3b2
Merge UpdateOrCreateMixin.
2013-01-26 17:20:52 -08:00
Carl Meyer
41607c0b56
Resolve duplication between two pull requests for Choices.__len__.
2013-01-26 17:04:15 -08:00
Carl Meyer
4217dbd7fe
Merge pull request #16 from ryankask/choices-len
...
__len__ method for Choices
2013-01-26 17:01:06 -08:00
James Oakley
9ea6605226
Add __len__() method to Choices
2012-10-30 11:01:57 -07: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
7cbfbdb453
len support for Choices.
2012-05-10 12:07:42 +01:00
Carl Meyer
4746180c4d
Improved fix for annotations and InheritanceQuerySet. Thanks Facundo Gaich.
2012-01-03 16:47:33 -07:00
Carl Meyer
c35746a445
Fixed annotation of InheritanceQuerySets. Thanks Jeff Elmore.
2012-01-03 15:47:41 -07:00
Carl Meyer
5710c8b504
Dropped support for obsolete Python 2.5 and Django 1.1.
2012-01-03 15:40:17 -07:00
Ryan Kaskel
6afa9d566d
Add convenience method to PassThroughManager.
2011-12-04 13:57:16 +00:00
Carl Meyer
b2aa8c2692
Merged.
2011-10-26 11:12:42 -06:00
smacker
b06ba20fe9
test and docs for get_subclass
2011-10-26 23:06:55 +06:00
Jeff Elmore
37e4eecace
Added explicit test of using 'get' method with select_subclasses
...
--HG--
extra : transplant_source : %9F%EA%C6%81%1D%BE%AA%0BQ5%A7%ECs%0Dwb%B8%B15%60
2011-07-02 11:58:14 -04: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
69d0985db1
Started deprecation for manager_from, InheritanceCastModel, and Django 1.1 support.
2011-04-16 14:51:14 -05:00
Carl Meyer
36b99304c2
Merged in PassThroughManager from Paul McLanahan.
2011-03-29 13:10:50 -04:00
Carl Meyer
1a8f7c5087
Added tox config.
2011-03-29 12:41:22 -04:00