django_polymorphic
django_polymorphic copied to clipboard
Seamless Polymorphic Inheritance for Django Models. For documentation and news click link below.
Hi, please report any issues you find at https://github.com/chrisglass/django_polymorphic While this repository still exists (and is rated high in google rankings), the author has disappeared from the Internet a few...
These should be moved to github (if available) and the links fixed. In particular I'd like to see Quickstart as this project looks really useful :/
``` python In [1]: Item.objects.all() Out[1]: --------------------------------------------------------------------------- DoesNotExist Traceback (most recent call last) in () ----> 1 Item.objects.all() /home/vagrant/env/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 236 self.start_displayhook() 237 self.write_output_prompt() --> 238 format_dict =...
Is it possible to use a OneToOneField as primary key in a PolymorphicModel? For example, take a look to the following snippet: class Food(models.Model): id = models.AutoField(primary_key=True) class PreparedFood(PolymorphicModel): id...
I've had an intermittent 500 error, with this report: `AssertionError: django_polymorphic: result objects do not have unique primary keys - model ` It's always been on that model, which led...
dumpdata results in something like: ``` { "pk": 4, "model": "configurableproduct.productboolean", "fields": { "field": 1, "product": "Baby Talk, Baby Wipes, Scented Thin", "order": 0, "value": true } }, ``` where...
The setup.py version number still says 0.2 was surprised when I did a PIP install from source knowing that the readme.md clearly says it's at least version >= 1.
The idea is kind of like proxy models (and could be implemented as variation on proxy models I think.) I explained this in [this thread on django-developers](http://groups.google.com/group/django-developers/browse_thread/thread/d4b03df0b8cdcfe8/466088ea49333fdb) Joins are bad,...
Suppose we have a model strucure: class ModelA(PolymorphicModel): b = ForeignKey('ModelB') class ModelB(PolymorphicModel): pass class ModelC(ModelB): pass The query ModelB.objects.filter(instance_of=ModelC) expands to ModelB.objects.filter(polymorphic_ctype=ContentType.objects.get_for_model(ModelC)) But the query ModelA.objects.filter(b__instance_of=ModelC) fails with error...
Django supports comfortable way to clone ORM entites by assigning None to a primary key field and calling a 'save()' method. For example: > x = Entity.objects.get(id=1) > x.id >...