diff --git a/docs/topics/browsable-api.md b/docs/topics/browsable-api.md index e9adc938e9..b261a66761 100644 --- a/docs/topics/browsable-api.md +++ b/docs/topics/browsable-api.md @@ -37,7 +37,7 @@ This means that during a `GET` request the view may be called again with `self.r ## Customizing -The browsable API is built with [Twitter's Bootstrap][bootstrap] (v 3.4.1), making it easy to customize the look-and-feel. +The browsable API is built with [Bootstrap][bootstrap] (v 5.3.8), making it easy to customize the look-and-feel. To customize the default style, create a template called `rest_framework/api.html` that extends from `rest_framework/base.html`. For example: @@ -55,16 +55,16 @@ To replace the default theme, add a `bootstrap_theme` block to your `api.html` a {% endblock %} -Suitable pre-made replacement themes are available at [Bootswatch][bswatch]. To use any of the Bootswatch themes, simply download the theme's `bootstrap.min.css` file, add it to your project, and replace the default one as described above. Make sure that the Bootstrap version of the new theme matches that of the default theme. +Suitable pre-made replacement themes are available at [Bootswatch][bswatch]. To use any of the Bootswatch themes, simply download the theme's `bootstrap.min.css` file, add it to your project, and replace the default one as described above. Make sure that the Bootstrap version of the new theme matches that of the default theme (Bootstrap 5). -You can also change the navbar variant, which by default is `navbar-inverse`, using the `bootstrap_navbar_variant` block. The empty `{% block bootstrap_navbar_variant %}{% endblock %}` will use the original Bootstrap navbar style. +You can also change the navbar variant, which by default is `navbar-dark`, using the `bootstrap_navbar_variant` block. The empty `{% block bootstrap_navbar_variant %}{% endblock %}` will use the original Bootstrap navbar style. Full example: {% extends "rest_framework/base.html" %} {% block bootstrap_theme %} - + {% endblock %} {% block bootstrap_navbar_variant %}{% endblock %} @@ -220,8 +220,8 @@ There are [a variety of packages for autocomplete widgets][autocomplete-packages [cerulean]: ../img/cerulean.png [slate]: ../img/slate.png [bswatch]: https://bootswatch.com/ -[bcomponents]: https://getbootstrap.com/2.3.2/components.html -[bcomponentsnav]: https://getbootstrap.com/2.3.2/components.html#navbar +[bcomponents]: https://getbootstrap.com/docs/5.3/components/ +[bcomponentsnav]: https://getbootstrap.com/docs/5.3/components/navbar/ [autocomplete-packages]: https://www.djangopackages.com/grids/g/auto-complete/ [django-autocomplete-light]: https://github.com/yourlabs/django-autocomplete-light [drf-restwind]: https://github.com/youzarsiph/drf-restwind diff --git a/docs/topics/html-and-forms.md b/docs/topics/html-and-forms.md index c7e51c1526..ec3a47a77d 100644 --- a/docs/topics/html-and-forms.md +++ b/docs/topics/html-and-forms.md @@ -92,13 +92,13 @@ The following view demonstrates an example of using a serializer in a template f The `render_form` tag takes an optional `template_pack` argument, that specifies which template directory should be used for rendering the form and form fields. -REST framework includes three built-in template packs, all based on Bootstrap 3. The built-in styles are `horizontal`, `vertical`, and `inline`. The default style is `horizontal`. To use any of these template packs you'll want to also include the Bootstrap 3 CSS. +REST framework includes three built-in template packs, all based on Bootstrap 5. The built-in styles are `horizontal`, `vertical`, and `inline`. The default style is `horizontal`. To use any of these template packs you'll want to also include the Bootstrap 5 CSS. -The following HTML will link to a CDN hosted version of the Bootstrap 3 CSS: +The following HTML will link to a CDN hosted version of the Bootstrap 5 CSS:
… - + Third party packages may include alternate template packs, by bundling a template directory containing the necessary form and field templates. @@ -131,7 +131,7 @@ Presents form labels above their corresponding control inputs, using the standar  @@ -151,9 +151,9 @@ Presents labels and controls alongside each other, using a 2/10 column split.