Commit Graph

14 Commits (6ec29b9e5e80b34ab131cb144833c465860ddc55)

Author SHA1 Message Date
Diederik van der Boor 3170ea95c2 autoflake: remove unused imports and statements 2016-12-19 11:12:40 +01:00
Diederik van der Boor 50f21dfa43 Rename manager.py => managers.py for consistency 2015-12-28 17:10:42 +01:00
Diederik van der Boor 4d526d8780 Simplify selecting get_queryset() vs get_query_set() -> use self.all() 2014-12-30 13:25:22 +01:00
Diederik van der Boor aead57c037 Fix Django 1.4/1.5 issues with RelatedManager code that overrides get_query_set()
Make sure the `RelatedManager.get_query_set()` is called, which limits
the set, instead of calling `self.get_queryset()` which then returns a new queryset.

Fortunately, this only happened on proxied calls for unknown methods.
2014-10-16 16:07:17 +02:00
Diederik van der Boor cf6d2a4a41 Replace get_query_set with assignment.
Avoid calling the super class by accident, potentially causing loops.
Follow the django-mptt approach here.
2014-09-22 15:00:29 +02:00
Marius Lueck fb1795ad12 Fixed compatibility with django 1.8 2014-07-25 11:48:07 +02:00
Tomas Peterka cbf52a61af Porting to Python 3.2
Removed compatibility_tools (because we aim to Python 2.7 and Python 3.2)
Performed 2to3 and modified
Usage of django.utils.six which adds dependency on Django >= 1.4.2
2013-05-20 16:03:21 +02:00
Diederik van der Boor 78253bfe12 Fix passing custom querysets to related managers.
* The custom manager was not assigned to _default_manager;
  get_first_user_defined_manager() always returned None
* The PolymorphicManager couldn't remember it's custom queryset;
  a RelatedManager creates a new instance of a manager, so the queryset
  parameter should be known at class-level, not object level.
* The old method of providing a custom queryset class has been deprecated.
2013-04-07 01:39:58 +02:00
Ben Konrath dc6f41c7e9 Update URLs to github hosted webpage. 2013-03-18 21:27:23 +01:00
Jonas Obrist 870091c13f Explicit is better than implicit 2012-01-09 16:47:59 +01:00
German M. Bravo f987818fe4 PEP 8 cleaning
Conflicts:

	polymorphic/__init__.py
	polymorphic/polymorphic_model.py
2011-12-20 18:59:50 +00:00
German M. Bravo bb06d6d12b Some more PEP 8 cleaning 2011-12-20 18:59:25 +00:00
Jonas Obrist f42c58c0d4 it's python, not javascript! 2011-05-19 06:01:07 -07:00
Bert Constantin 116e2af08b IMPORTANT: import path changed, it's now: "from polymorphic import PolymorphicModel, ..."
- added python2.4 compatibility. Contributed by Charles Leifer. Thanks!
- general reorganization of the code - there is no single polymorphic.py module anymore,
  so d-p now needs to be installed as a regular Django app
- polymorphic.VERSION/get_version added
- version numbering started: V0.5 beta
2010-02-22 16:16:00 +01:00