Commit Graph

794 Commits (24dd1fff2cc33f06c1afc506385025173f0820da)

Author SHA1 Message Date
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
Diederik van der Boor 2e2728e2c6 Merge pull request #87 from krayevidi/master
Adds pk_regex attr in PolymorphicParentModelAdmin
2014-07-08 17:14:54 +02:00
Andrew d8d6f07f71 Adds pk_regex attr in PolymorphicParentModelAdmin 2014-07-08 18:05:04 +03:00
Diederik van der Boor ba941165ab set date in changelog as well 2014-04-29 14:13:10 +02: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
Diederik van der Boor 5499901db7 Merge branch 'jf/polymorphic' of https://github.com/gnulnx/django_polymorphic into gnulnx-jf/polymorphic 2014-04-29 14:04:53 +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
Diederik van der Boor 4af7f49908 Added changelog entry for PR #77 2014-04-29 11:58:49 +02:00
Diederik van der Boor adf0be6579 Merge pull request #77 from gnulnx/jf/polymorphic
Fix proposal for get_real_instance_class() for proxy models
2014-04-29 11:56:15 +02:00
John Furr f85ebdd9e6 Fix get_real_instance_class for proxy models 2014-04-28 11:32:30 -04:00
Diederik van der Boor 36d1cc2961 Merge pull request #75 from vail130/master
Fixed tab spacing in admin.rst
2014-04-22 13:49:42 +02:00
Vail Gold d901524e75 Fixed tab spacing in admin.rst 2014-04-22 07:39:58 -04:00
Diederik van der Boor be8d7d016f Merge pull request #74 from vail130/master
Added to admin docs how to add polymorphic child model as inline.
2014-04-22 11:17:04 +02:00
Vail Gold df178dbb44 Added to admin docs how to add polymorphic child model as inline. 2014-04-19 14:28:08 -04:00
Diederik van der Boor bf64b111c4 Merge pull request #73 from utapyngo/master
Fixed typo: CopntentType
2014-04-18 14:33:04 +02: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 acf1ddc086 update changelog too for #69 2014-04-03 14:29:09 +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
hottwaj fd0ed96c1a Fixed bugs in superclass/subclass field link processingso that this can cope with proxy models, as well as parent_link and related_name links to parents.
Added a test case for testing parent_link and related_name links to parent.

All tests pass should pass now (at least they do for me on django 1.5 and python 2.7)
2014-02-19 10:56:02 +00:00
hottwaj 3e718d305e Changed methods used for traversing subclasses and superclasses of a given model.
Now uses model._meta.parents to determine superclasses.  _meta.parents is a dict of superclass: field_to_superclass pairs.

By using the field name of field_to_superclass, we can work out the field to use the django_polymorphic accessor on, even if a user-specified OneToOneField to parent is is used (with parent_link=True) to get to the parent in the inheritance hierarachy.

For subclasses, the path to the subclasses can be manually specified by the user if they use a 'related_name' on the OneToOneField from the subclass to the superclass.  I have changed the code to also support 'related_name' if present
2014-02-18 18:00:18 +00:00
Diederik van der Boor b73f22f4e0 cleanup: reorder tox envlist for readability 2014-02-13 10:44:06 +01:00
Diederik van der Boor 4be6d42fad Optimize NewBase test of six.with_metaclass() for Django 1.5+ 2014-02-13 10:43:33 +01:00
Diederik van der Boor 96ac22b55f Merge pull request #60 from dezede/translation
Adds a french translation.
2013-12-17 08:03:43 -08:00
Bertrand Bordage ed708c69c6 Adds a french translation. 2013-11-29 18:18:55 +01:00
Diederik van der Boor 669a4387d8 tests: update tox/Travis Djagno versions 2013-11-14 17:16:56 +01:00
Diederik van der Boor e1093ff1fb Fix .non_polymorphic(), returns a copy of the queryset
Just like .filter() and such do.
2013-09-19 19:36:05 +02:00
Diederik van der Boor 61e9a8050a Bump version to 0.5.3 2013-09-17 11:33:56 +02:00
Diederik van der Boor a8d27ca94e Pass ``/admin/app/model/ID/...`` URLs to the correct admin backend.
Using the ID field, the correct ``ct_id`` parameter can already be
determined.
2013-09-17 11:02:38 +02:00
Diederik van der Boor e0446bd76c Fix TypeError when ``base_form`` was not defined. 2013-09-17 10:50:46 +02:00
Diederik van der Boor b622d6f6a1 Bump version to 0.5.2 2013-09-05 11:38:26 +02:00
Diederik van der Boor 638ecd5813 Fix admin validation errors related to additional non-model form fields. 2013-09-05 11:36:54 +02:00
Diederik van der Boor e1cecc1a91 Add ContentType.objects.get_for_id() note to the docs. 2013-09-05 11:12:19 +02:00
Diederik van der Boor b2be0701ca Fix missing permission check in the "add type" view.
The permissions were checked in the next step,
so this didn't cause a security issue.
2013-08-20 12:07:29 +02:00
Diederik van der Boor 496e2c2cf2 Merge pull request #49 from funkybob/master
Document the polymorphic_list property
2013-07-29 04:04:49 -07:00
Curtis 1b4e1b021d Document the polymorphic_list property 2013-07-29 20:59:53 +10:00
Diederik van der Boor 9d00d214e1 Fix unwanted `___` handling when a fieldname starts with an underscore. 2013-07-22 10:21:00 +02:00
Diederik van der Boor d16f2d7590 Add changelog entry for Grappelli fix. 2013-07-18 21:17:00 +02:00
Diederik van der Boor cdc9b16aa8 Merge pull request #44 from BertrandBordage/master
Grappelli support & django-reversion support documentation.
2013-07-18 12:14:40 -07:00
Bertrand Bordage ec194164ea [Docs] Explains how to use django-reversion with polymorphic models. 2013-07-18 19:31:55 +02:00