jquery gets included multiple times
|Reported by:||mariarchi||Owned by:||tobias|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
ModelAdmin adds jquery.min.js to the self.media if self.actions is not False.
However, InlineModelAdmin by default includes jquery.min.js as well.
So given a model with N inlines by default we end up with N+1 jqueries.
It wouldn't be that bad, however, what makes it really bad is the fact that if the main form specifies a jquery plugin in the media definition it will be overwritten by vanilla redundant jquery.
The simplest fix would be to implement internal storage in Media object as a set which would remove redundant entries.
Change History (12)
comment:1 Changed 4 years ago by russellm
- milestone set to 1.2
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 4 years ago by tobias
- Owner changed from nobody to tobias
- Status changed from new to assigned
comment:4 Changed 4 years ago by tobias
- Resolution set to worksforme
- Status changed from assigned to closed
comment:5 Changed 4 years ago by mariarchi
- Resolution worksforme deleted
- Status changed from closed to reopened
Changed 4 years ago by ubernostrum
comment:7 Changed 4 years ago by ubernostrum
- Resolution set to fixed
- Status changed from reopened to closed