Name |
Last commit
|
Last update |
---|---|---|
.. | ||
assets | ||
templates | ||
tests | ||
__init__.py | ||
models.py | ||
settings.py | ||
urls.py | ||
utils.py | ||
views.py |
Django allows forms and widgets to define the CSS or JavaScript files needed on the page, automatically including those files in the administration UI. This works fine for standalone media files, but weren't an option for Pipeline packages. This change introduces a branch new `PipelineFormMedia` class that a form or widget's Media class can inherit from. The Media class can then define `css_packages` or `js_packages` attributes that work just like the standard `css`/`js` attributes but reference package names instead of individual files. Upon accessing the `css` or `js` attributes, the files defined in the packages will be collected/processed just like with the template tags and the resulting filenames returned for use in the page. Using this, any page compatible with Django's form media support will work automatically with any form or widget that wants to use Pipeline packages, without any modifications to templates or any other workarounds that were needed before. This implements issue #154.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
assets | Loading commit data... | |
templates | Loading commit data... | |
tests | Loading commit data... | |
__init__.py | Loading commit data... | |
models.py | Loading commit data... | |
settings.py | Loading commit data... | |
urls.py | Loading commit data... | |
utils.py | Loading commit data... | |
views.py | Loading commit data... |