Diederik van der Boor
c947c3dec1
Merge pull request #119 from theatlantic/child-model-custom-pk-bug
...
Bug with queryset results on base model where child model has a custom primary key
2015-04-08 13:09:35 +02:00
Diederik van der Boor
d16d989e91
Merge pull request #118 from theatlantic/_default_manager-instance-fix
...
Set _default_manager directly on model_cls; don't use add_to_class()
2015-04-08 13:06:12 +02:00
Frankie Dintino
1be1fc02db
Fix missing items bug in qset on child of PolymorphicModel w custom pk
...
fixes #66
2015-01-31 17:11:03 -05:00
Frankie Dintino
ad63c6a442
Test missing items bug in qset on child of PolymorphicModel w custom pk
...
refs #66
2015-01-31 17:10:57 -05:00
Frankie Dintino
a3d9379876
Set _default_manager directly on model_cls; don't use add_to_class()
...
Using model_cls.add_to_class() calls Manager.contribute_to_class(),
which then sets the attribute to an instance of ManagerDescriptor. In
the case of _default_manager, this behavior differs from Django's, as
_default_manager is set to the manager instance itself, not its
descriptor. This is why it is normally possible to access default_manager
from a model instance.
fixes #96
2015-01-31 13:17:56 -05:00
Chris Barna
d56d9bfd15
Add tests for instance._default manager. Refs #96
2015-01-31 13:17:56 -05:00
ellmetha
469d063cc9
Django 1.8 alpha support
2015-01-28 00:41:34 +01:00
Diederik van der Boor
ca6fba91ba
PEP8-ify PR #67 and fix trailing whitespace
...
Camp rule: leave things in a better state then you found it.
2014-12-30 13:36:25 +01:00
Diederik van der Boor
261e382556
Merge pull request #67 from hottwaj/parent_link_support
...
parent_link and related_name support for inheritance fields
2014-12-30 13:34:16 +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
4bddac7c70
Fix validate_model_fields(), caused errors when metaclass raises errors
2014-10-29 18:58:54 +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
6d043d35d2
Bump version to 0.6.1 already
2014-10-14 17:32:40 +02:00
Diederik van der Boor
948749dbdb
Remove Django 1.7 warnings
2014-10-14 17:30:25 +02:00
Diederik van der Boor
c9e232a79b
Bump version to 0.6
2014-10-14 16:29:30 +02:00
Diederik van der Boor
84791daf47
Merge pull request #99 from benkonrath/admin_class_permissions
...
Use admin class function to check permissions.
2014-09-22 16:03:55 +02:00
Diederik van der Boor
981614e5c6
Merge branch 'django_1.7_support' of https://github.com/g3rd/django_polymorphic
...
Conflicts:
docs/managers.rst
polymorphic/admin.py
polymorphic/manager.py
polymorphic/tests.py
runtests.py
2014-09-22 15:42:35 +02:00
Diederik van der Boor
ff6b09e7c7
admin: split get_queryset() / queryset() methods.
...
avoid calling loops due to some inherited classes
2014-09-22 15:14:32 +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
Diederik van der Boor
ea160669cf
Merge pull request #91 from mlsen/master
...
Django 1.8 compatibility
2014-09-22 14:51:03 +02:00
Chad Shryock
cc53b3003e
Remove exception.
2014-09-17 08:30:12 -04:00
Chad Shryock
b9654b7138
Missing return.
2014-09-17 08:26:28 -04:00
Chad Shryock
734752c2e7
Django 1.7 upgrades
2014-09-16 22:11:13 -04:00
Ben Konrath
6aa9d7cc3a
Use admin class function to check permissions.
2014-09-11 15:18:40 +02:00
Chad Shryock
af4843e54b
Cleared up the Django 1.8 Warning messages.
2014-09-10 23:13:51 -04:00
Ben Konrath
ec5ce49d81
Use consistent labels in admin.
2014-08-04 15:05:13 +02:00
Diederik van der Boor
14df8c529e
Move the get_permission_codename import to the main code.
...
cc #93
2014-07-29 12:15:09 +02:00
Kevin Armenat
029bb2ae1a
added django < 1.6 compatibilty for permission codename generation
2014-07-29 11:15:38 +02:00
Kevin Armenat
6ce390f777
added permission check for all child types
2014-07-29 09:47:23 +02:00
Marius Lueck
d755d257ef
Changed super call of get_queryset to queryset
2014-07-25 22:55:58 +02:00
Marius Lueck
fb1795ad12
Fixed compatibility with django 1.8
2014-07-25 11:48:07 +02:00
Diederik van der Boor
831075c3c7
bump version to 0.5.6
2014-07-21 11:42:26 +02:00
Jacob Rief
62e7940c33
Fixed: adding polymoric model with django-parler did not work
2014-07-18 18:26:51 +02:00
Diederik van der Boor
d8b40167d3
Mention the improvements of #87 in the changelog and documentation too.
2014-07-08 17:18:07 +02:00
Andrew
d8d6f07f71
Adds pk_regex attr in PolymorphicParentModelAdmin
2014-07-08 18:05:04 +03:00
Diederik van der Boor
8a548ca829
bump version to 0.5.5
2014-04-29 14:11:58 +02:00
Diederik van der Boor
b9d7e9f234
Improved description of test_proxy_get_real_instance_class unit test
...
Camp life rule: leave things better then you found them.
2014-04-29 14:07:33 +02:00
John Furr
8687e135a3
Test that proxy models derived from PolyMorphicBase classes
...
can call get_real_instance() and get_real_instance_class()
Includes:
def test_proxy_get_real_instance_class(self):
2014-04-29 07:35:27 -04:00
John Furr
f85ebdd9e6
Fix get_real_instance_class for proxy models
2014-04-28 11:32:30 -04:00
utapyngo
e1a4ba80e9
Fixed typo: CopntentType
2014-04-18 19:17:23 +07:00
Diederik van der Boor
6c58acac8d
bump version and changelog
2014-04-09 12:11:29 +02:00
Diederik van der Boor
35cdb7b697
Fix subclass protection when ContentType is stale
2014-04-07 14:38:34 +02:00
Diederik van der Boor
e8d5ce6231
Add protection against mixed up ContentType tables
2014-04-04 15:28:47 +02:00
Diederik van der Boor
b5774423f7
Improve on #69 , using setdefault() and update example project
...
Camp site rule; leave things tidier than you found them :)
2014-04-03 14:27:56 +02:00
Diederik van der Boor
08e900eb6d
Merge pull request #69 from borgstrom/django16
...
Prevent infinite recursion in Django 1.6
2014-04-03 14:24:52 +02:00
Diederik van der Boor
157f6b1057
Fix missing ``alters_data = True`` annotations.
2014-04-03 14:10:53 +02:00
Evan Borgstrom
d93add71fb
Be more specific in the condition before setting 'fields'
2014-03-13 16:50:25 -04:00
Evan Borgstrom
134c44bef0
Prevent infinite recursion in Django 1.6
2014-03-13 16:39:13 -04:00
hottwaj
02221d7d10
changed dict.iteritems() call to dict.items() for python 3 compatibility...
2014-02-19 11:05:57 +00:00
hottwaj
578aa8f1dd
removed pdb import which I used for testing...
2014-02-19 11:00:19 +00:00