Add media descriptions to newforms widgets
|Reported by:||Russell Keith-Magee||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
At present, there is no easy way to:
- identify what media is required to display a form
- identify and eliminate any duplicate media requirements, e.g., a base css file required by two different widgets on a form.
It involves adding a meta-class to Widget that processes a 'Media' inner class; this inner class is turned into a 'Media' object. Media objects can be printed (yielding <link> and <script> statements). Media objects can also be added, so media from one widget can be added to another widget, yielding the union of required media.