Commit graph

208 commits

Author SHA1 Message Date
Carl Meyer
f19755ae81 Merge pull request #105 from patrys/patch-1
Don't try to access __slots__ during copy()
2014-01-25 16:35:09 -08:00
Carl Meyer
febc3d645a Merge pull request #101 from funkybob/issue-34
Attempt to carry over extras(select) values from parent
2014-01-25 16:25:36 -08:00
Carl Meyer
26f4d7c8f5 Silence BooleanField default warnings. 2014-01-25 17:11:26 -07:00
funkybob
a5fe3de330 Deal with Django <1.7 using SortedDict wherein keys() is a generator, not a view 2014-01-21 09:19:54 +11:00
Patryk Zawadzki
80547335c0 Don't try to access __slots__ during copy()
When subclassing Django will copy managers from the ancestor class. Copying in turn calls `copy.copy()` which checks whether the object uses `__slots__` or `__dict__`. This could result in the manager calling `self.get_queryset()` before all models get registered with the ORM.
2014-01-20 12:50:37 +01:00
funkybob
91b07079e0 Use legacy compatible approach 2014-01-14 15:05:03 +11:00
funkybob
cb362f4a12 Shorten test docstring 2014-01-13 16:49:18 +11:00
Carl Meyer
6512e3e00e Remove trailing whitespace. 2014-01-10 16:29:59 -07:00
Douglas Meehan
33c600e28c edited class names 2014-01-10 16:18:10 -05:00
Douglas Meehan
9e024a14af removed trailing whitespace 2014-01-10 16:15:42 -05:00
Douglas Meehan
aaf1fc8636 changed class names to be more descriptive 2014-01-10 16:06:08 -05:00
Douglas Meehan
55a15f7e55 Update managers.py 2014-01-09 16:58:51 -05:00
Douglas Meehan
72c8f0bc18 moved get_query_set = get_queryset from the mixin to the manager 2014-01-09 21:47:46 +00:00
Curtis Maloney
0e77c327f5 Update tests.py 2014-01-09 15:46:11 +11:00
Douglas Meehan
c787a98f21 removed GeoDjango specific code. Abstracted all managers 2014-01-08 17:19:00 +00:00
Douglas Meehan
e7c3f6b28e edited doc string 2014-01-08 16:57:59 +00:00
Douglas Meehan
a1ffac9fa7 edited class names 2014-01-08 16:56:32 +00:00
Douglas Meehan
a1abc9bb8a edited class names 2014-01-08 16:54:41 +00:00
Douglas Meehan
b529e576ff added geo support for PassThroughManager 2014-01-08 16:46:39 +00:00
Curtis
6f30e88ba5 Attempt to carry over extras(select) values from parent 2014-01-08 23:46:00 +11:00
Carl Meyer
87f7209042 Bump version for dev. 2014-01-06 18:26:01 -07:00
Carl Meyer
6b4a900ca0 Bump version to 2.0. 2014-01-06 18:22:24 -07:00
Carl Meyer
5e39bcd756 Remove special support for pickling PassThroughManager; apparently unnecessary in all supported Django/Python versions. 2014-01-06 18:18:42 -07:00
Carl Meyer
32aa781dc2 Merge branch 'master' into query-set-deprecated
* master:
  Update tox.ini.
  Update runtests.py for compatibility with Django 1.7.
  Check for StatusModel field name conflicts correctly.
2014-01-06 16:06:31 -07:00
Carl Meyer
8ea75e53f4 Check for StatusModel field name conflicts correctly. 2014-01-06 16:03:44 -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
dd469a0e8f Added test to explicitly demonstrate manually defined related_name
usage works in select_subclasses going forwards.

Also fixed fragility of 2 tests introduced in ae71f9080e
2013-10-26 16:34:21 +01:00
Keryn Knight
a270eef1fd Fixed #59 - manually setting the parent relation
via a OneToOne should present the same behaviour
as the implicit ptr Django generates on
subclasses.

Thanks to Eran Rundstein for reporting the issue
and proposing the fix.
2013-10-26 15:53:15 +01:00
Keryn Knight
262455a60d Update model tests to include our new InheritanceManagerTestChild3
as part of the emulation of select_subclasses.

Test still fails because of #59.
2013-10-26 15:50:19 +01: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
Carl Meyer
06d3b7a5cf Tweak line-continuation indentation. 2013-10-22 12:23:16 -06:00
Keryn Knight
1de58474c0 Implemented #44 - passing Model classes to InheritanceManager's select_subclasses 2013-10-21 21:47:58 +01:00
Carl Meyer
3211c92a4d Merge branch 'master' into fix-choices-deepcopy
* master: (23 commits)
  only accepting iterables to the when field
  adding 'when' parameter to MonitorField
  Update AUTHORS and changelog.
  Add test to verify get_subclass() on QuerySet
  Refactor to make sure get_subclass() is on QuerySet
  Fixed indexing into Choices so its useful.
  Fix bug with child/grandchild select_subclasses in Django 1.6+; thanks Keryn Knight.
  fixed code block
  Bump version for dev.
  Bump version for 1.5.0 release.
  Add option-groups capability to Choices.
  Add Changelog note about Choices equality/addition.
  Added tests to improve coverage
  Alphabetised authors
  Removed redundant inequality method on Choices
  Moved documentation for Choices field to the right place
  Corrected typo
  Added self to Authors file
  Added equality methods to Choices objects, and overrode + for Choices for easy concatenation with other Choices and choice-like iterables. Also wrote tests for them, and extended the readme to reflect this
  Fix typo noted by @silonov
  ...

Conflicts:
	model_utils/choices.py
2013-10-11 13:23:56 -06: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
Travis Swicegood
03c8a1929b Add test to verify get_subclass() on QuerySet 2013-10-08 10:38:52 -05:00
Travis Swicegood
9111843752 Refactor to make sure get_subclass() is on QuerySet
There's an edge case where you might want to call get_subclass() on a
QuerySet the same way you can call get() after you have already called
various filter/exclude methods.
2013-10-07 18:15:41 -05:00
Carl Meyer
5a33ff760a Fixed indexing into Choices so its useful. 2013-09-24 15:13:27 -06: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
Carl Meyer
4e7ddfc221 Bump version for dev. 2013-08-29 22:35:32 -06:00
Carl Meyer
edbef99ce2 Bump version for 1.5.0 release. 2013-08-29 22:06:44 -06:00
Carl Meyer
2e44f1c2c0 Add option-groups capability to Choices. 2013-08-29 22:00:53 -06:00
Tony Aldridge
b706aee4a9 Added tests to improve coverage 2013-08-25 08:29:10 +01:00
Tony Aldridge
1a6d9a193e Removed redundant inequality method on Choices 2013-08-24 10:51:25 +01:00
Tony Aldridge
3485df15f2 Merge remote-tracking branch 'upstream/master'
Conflicts:
	README.rst
2013-08-24 10:36:21 +01:00
Tony Aldridge
003ad70805 Added equality methods to Choices objects, and overrode + for Choices
for easy concatenation with other Choices and choice-like iterables.
Also wrote tests for them, and extended the readme to reflect this
2013-08-23 16:58:10 +01:00
Den Lesnov
18999c43dd Added deepcopy test 2013-08-21 17:15:19 +04:00
Trey Hunner
e1faec7577 Merge pull request #73 from silonov/json_fields_support
Json fields support
2013-08-17 01:46:31 -07:00