Skip to content

Conversation

@JohananOppongAmoateng
Copy link
Contributor

@JohananOppongAmoateng JohananOppongAmoateng commented Dec 23, 2025

This PR addresses multiple long-standing edge cases in django-polymorphic related to formsets and admin customization. Specifically, it improves how polymorphic formsets handle child form configuration, polymorphic_ctype initialization, and fieldset extensibility in subclassed models.

The changes aim to make polymorphic forms more predictable, composable, and aligned with standard Django behavior, while removing the need for fragile workarounds in downstream projects.
comprehensive documentation about the ManyToMany limitation with polymorphic inline forms to address GitHub issue #294.
Closes #578
closes #549
Closes #472
Closes #363
Closes #294

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 90.38462% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.28%. Comparing base (06729c3) to head (c649b5f).

Files with missing lines Patch % Lines
src/polymorphic/formsets/models.py 80.95% 1 Missing and 3 partials ⚠️
src/polymorphic/admin/childadmin.py 96.77% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #756      +/-   ##
==========================================
+ Coverage   83.98%   84.28%   +0.29%     
==========================================
  Files          27       27              
  Lines        1611     1654      +43     
  Branches      253      269      +16     
==========================================
+ Hits         1353     1394      +41     
  Misses        196      196              
- Partials       62       64       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants