jquery gets included multiple times
|Reported by:||mariarchi||Owned by:||Tobias McNulty|
|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 7 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|
comment:3 Changed 7 years ago by
|Owner:||changed from nobody to Tobias McNulty|
|Status:||new → assigned|