Ran
|
Jobs
7
|
Files
7
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
travis-ci
Remove unnecessary TreeIndexView media property The TreeModelAdmin index view (TreeIndexView) defines its own media property, which pulls in the extra CSS from this package. This is unnecessary, because the base ModelAdmin IndexView from which it inherits already provides a media property, which pulls in both extra CSS and JS, if specified by inheriting ModelAdmins. This functionality exists in all versions of Wagtail supported by this package: 1.13: https://github.com/wagtail/wagtail/blob/v1.13/wagtail/contrib/modeladmin/views.py#L251-L256 2.5: https://github.com/wagtail/wagtail/blob/v2.5/wagtail/contrib/modeladmin/views.py#L261-L266 Current master: https://github.com/wagtail/wagtail/blob/7fdb06c86/wagtail/contrib/modeladmin/views.py#L258-L262 Removing this not only eliminates duplicate code, but also fixes a problem where TreeModelAdmins can't provide their own JS files, because they aren't included in the media property. For example, TreeModelAdmin currently isn't compatible with wagtail-orderable (https://pypi.org/project/wagtail-orderable/) for this reason. Making this change, and falling back on the default CSS+JS inclusion, allows for customization of TreeModelAdmin JS.
201 of 201 relevant lines covered (100.0%)
6.0 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 671.1 (TOXENV=lint) | 0 | Travis Job 671.1 | ||
2 | 671.2 (TOXENV=py27-dj111-wag113) | 7 |
100.0 |
Travis Job 671.2 | |
3 | 671.3 (TOXENV=py36-dj111-wag113) | 7 |
100.0 |
Travis Job 671.3 | |
4 | 671.4 (TOXENV=py36-dj111-wag22) | 7 |
100.0 |
Travis Job 671.4 | |
5 | 671.5 (TOXENV=py36-dj21-wag23) | 7 |
100.0 |
Travis Job 671.5 | |
6 | 671.6 (TOXENV=py36-dj21-wag24) | 7 |
100.0 |
Travis Job 671.6 | |
7 | 671.7 (TOXENV=py36-dj22-wag25) | 7 |
100.0 |
Travis Job 671.7 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|