django-polymorphic
django-polymorphic copied to clipboard
Improved Django model inheritance with automatic downcasting
This issue tracks the implementation of the [Jazzband guidelines](https://jazzband.co/about/guidelines) for the project [django-polymorphic](https://github.com/jazzband/django-polymorphic) It was initiated by @vdboor who was automatically assigned in addition to the [Jazzband roadies](https://jazzband.co/roadies). See the...
Fixes bug when using `Exists` subqueries which are or-ed together: ```python SomeModel.objects.filter( Exists(RelatedModelA.objects.filter(some_model=OuterRef("pk")) | Exists(RelatedModelB.objects.filter(some_model=OuterRef("pk")) ) ``` This is done usually for performance reasons, but it is a valid queryset....
Lets take a model like this: ```python class Test(PolymorphicModel): created_date = models.DateTimeField(default=timezone.now) class Meta: ordering = ['-created_date'] ``` With an initial migration: ```python migrations.CreateModel( name='Test', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False,...
This pull request add support for select related and general related queries. **Summary** To take advantage of this it requires that the plain Django model either adds a custom query...
I modified the example pexp/admin.py. According to the documentation, connect to Django- reversion. I added data in admin to "ModelC". When I go into the history of a way to...
This was an issue that kept popping up in a work project that utilizes django-polymorphic. Specifically, the issue was that django-polymorphic didn't respect multiple databases for deletion, causing it to...
```python class Parent(PolymorphicModel): ... class Child(Parent): spam = models.ManyToManyField(Parent) ``` ``` $ ./manage.py makemigrations SystemCheckError: System check identified some issues: ERRORS: myapp.Child.spam: (fields.E305) Reverse query name for 'myapp.Child.spam' clashes with...
Hi all! I just had a strange error in my work project. It's an ML project where user can create projects, upload datasets and then work with them. First of...