Skip to content

Commit 99cf2c4

Browse files
Docs: Updated browsable-api.md (#8678)
- Replace the broken Bootswatch-Link with an Jsdelivr-Link as suggested at https://bootswatch.com/help/ - Updated the stated Bootstrap version - Added a note that the Bootstrap version must match the default one Co-authored-by: Tom Christie <[email protected]>
1 parent e7777cb commit 99cf2c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/topics/browsable-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ By default, the API will return the format specified by the headers, which in th
1717

1818
## Customizing
1919

20-
The browsable API is built with [Twitter's Bootstrap][bootstrap] (v 3.3.5), making it easy to customize the look-and-feel.
20+
The browsable API is built with [Twitter's Bootstrap][bootstrap] (v 3.4.1), making it easy to customize the look-and-feel.
2121

2222
To customize the default style, create a template called `rest_framework/api.html` that extends from `rest_framework/base.html`. For example:
2323

@@ -35,7 +35,7 @@ To replace the default theme, add a `bootstrap_theme` block to your `api.html` a
3535
<link rel="stylesheet" href="/path/to/my/bootstrap.css" type="text/css">
3636
{% endblock %}
3737

38-
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.
38+
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.
3939

4040
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.
4141

@@ -44,7 +44,7 @@ Full example:
4444
{% extends "rest_framework/base.html" %}
4545

4646
{% block bootstrap_theme %}
47-
<link rel="stylesheet" href="https://bootswatch.com/flatly/bootstrap.min.css" type="text/css">
47+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@3.4.1/flatly/bootstrap.min.css" type="text/css">
4848
{% endblock %}
4949

5050
{% block bootstrap_navbar_variant %}{% endblock %}

0 commit comments

Comments
 (0)