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

### Description I am encountering an issue when using `GenericPrefetch` with `PolymorphicModel`. The `content_object` attribute is `None` when trying to prefetch related objects. ### Environment - Django version: 5.0.7 -...

Scenario: - in Django admin click green + next to the foreign key field that opens `PolymorphicParentModelAdmin` add view - Submit form with validation error - Fix the error and...

If we have a model structure like: ```py from polymorphic.models import PolymorphicModel class Project(PolymorphicModel): topic = models.CharField(max_length=30) class ArtProject(Project): artist = models.CharField(max_length=30) ``` and populate it a little, if we...

bug

There's a [tag for v4.0.0](https://github.com/jazzband/django-polymorphic/tree/v4.0.0), but [the last entries in the changelog](https://github.com/jazzband/django-polymorphic/blob/v4.0.0/docs/changelog.rst) are for v3.1. Are we aware of what the breaking changes were for this release, or do we...

When you save a polymorphic model form in the admin, you lose the changelist filter that was defined in your URL. This is because in `django/contrib/admin/templatetags/admin_urls.py`, Django compares the changelist...

bug

In setup: class Printer(PolymorphicModel): ... class LargeFormatPrinter(Printer): .... class PrintMode(models.Model): printer = models.ForeignKey(Printer) query = PrintMode.objects.all().select_related('printer) query[0].printer always refer to base class. Am I doing something wrong? Or select_related breaks...

Hello everybody, I stumbled upon the following issue while implementing advanced filtering in the admin views (using [advanced-filters](https://github.com/modlinltd/django-advanced-filters)): Polymorphic models can't be filtered, because the `Q` object passed from *django-advanced-filters*...

bug
help wanted
good first issue

I have some existing data for a polymorphic model, `Event`, that was created at a time when `Event` itself was registered as a child model. So `polymorphic_ctype` points to the...

Tripping over the same issue that was documented [here](https://github.com/jazzband/django-polymorphic/issues/53) back in 2013 and without a solution, I decided to get rid of the error-causing clause and live dangerously. In my...