Repository navigation
Commit 2cba47c
docs: cover jQuery and the stale settings block in the migration guide (#893)
The guide said "load it yourself if you need it" about jQuery and left it
there. Say what actually replaces it: there is no `jquery_url` setting and no
`{% bootstrap_jquery %}` or `{% bootstrap_jquery_url %}` tag, so it comes from
your own template.
For most projects that is the whole story, because `include_jquery` defaulted
to `False` in both packages and the jQuery on the page was already theirs. It
bites through `jquery_url`, whose django-bootstrap3 default was the unversioned
`//code.jquery.com/jquery.min.js`. That alias still serves jQuery 1.11.1 from
2014 and is not updated, so a project on the default has been serving a jQuery
that is two majors behind. Bootstrap 3 itself accepted `1.9.1 - 3`, so nothing
about Bootstrap 3 held it there.
Point at jQuery's own upgrade guide rather than restating it, and say to check
plugins at the same time, since an old jQuery tends to come with old plugins.
One project had to take bootstrap-datepicker from 1.6.0 to 1.10.0.
django-bootstrap4 defaulted to jQuery 3.5.1, so no major jQuery upgrade comes
with that move at all. The django-bootstrap4 section said the opposite.
Also say to delete the `BOOTSTRAP3` block after adding a `BOOTSTRAP5` one.
`W001` only inspects `BOOTSTRAP5`, so a leftover block is invisible to it while
still reading like configuration. In the project this came from it named the
same jQuery file a `<script>` tag in the base template loaded directly, so it
was the first place anyone looked to find out how jQuery reached the page.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 2a0cf12 commit 2cba47c
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
106 | 127 | | |
107 | 128 | | |
108 | 129 | | |
| |||
141 | 162 | | |
142 | 163 | | |
143 | 164 | | |
144 | | - | |
| 165 | + | |
| 166 | + | |
145 | 167 | | |
146 | 168 | | |
147 | 169 | | |
| |||
0 commit comments