django-polymorphic icon indicating copy to clipboard operation
django-polymorphic copied to clipboard

Improved Django model inheritance with automatic downcasting

Results 150 django-polymorphic issues
Sort by recently updated
recently updated
newest added

Hello, I have the following models representing some `Data` that can be created by an `Annotator` which can either be a human `UserAnnotator` or an AI `AiModelAnnotator` ``` class Annotator(PolymorphicModel):...

I've created a minimal recreation to verify that this works in Django normally, with model inheritance. You can have a `demo/models.py` like this: ``` class FooManager(models.Manager): def get_by_natural_key(self, slug): return...

I am writing this ticket to get some some feedback about my implementation and whether django-polymorphic is actually the right way to go. I get some massive performance issue in...

I am using django-polymorphic I have a class Base(PolymorphicModel): # some fields class Child(Base): # some field class Foo(models.Model): fk = models.ForeignKey(Base, null=True, on_delete=models.SET_NULL) And I use them as child...

In the documentation, it's mentioned you can use Q objects for filtering by different fields i.e. ``` items.filter( Q(ModelA___field1 = 4) | Q(ModelB___field2 = 4) | Q(ModelC___field3 = 4) )...

Hey there, I have been trying to create objects from a json file with the `loaddata` command without success. Is there anything special that I need write in the document?...

Regarding the documentation: > select_related() works just as usual, but it can not (yet) be used to select relations in inherited models (like ModelA.objects.select_related('ModelC___fieldxy') ) Is there a chance you...

enhancement

Hello, First off thanks for creating this package! I am running into an issue now where we needed to create two different admin pages and creating proxy models seems like...

Hi, I am struggling with following exception when calling custom method on `PolymorphicQuerySet` within reverse related queryset: ``` AttributeError: 'PolymorphicQuerySet' object has no attribute 'custom_method' ``` **Managers/Querysets:** ``` python class...