diff options
| author | Tom Christie | 2013-02-06 12:35:05 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-02-06 12:35:05 +0000 |
| commit | 4788c87b76782b828d4c504e8a5deab4e07ebcd4 (patch) | |
| tree | 21335b0ea121330bc5a3310271a7ca3cd2b87093 | |
| parent | 72fe686623f63b79fa2b7f7de177c6d98bc1da3f (diff) | |
| download | django-rest-framework-4788c87b76782b828d4c504e8a5deab4e07ebcd4.tar.bz2 | |
Fix mismatch between template blocks and docs.
Fixes #639.
| -rw-r--r-- | docs/topics/browsable-api.md | 7 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/base.html | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/docs/topics/browsable-api.md b/docs/topics/browsable-api.md index 9fe82e69..5f80c4f9 100644 --- a/docs/topics/browsable-api.md +++ b/docs/topics/browsable-api.md @@ -35,23 +35,20 @@ A suitable replacement theme can be generated using Bootstrap's [Customize Tool] 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. -For more specific CSS tweaks, use the `extra_style` block instead. +For more specific CSS tweaks, use the `style` block instead. ### Blocks All of the blocks available in the browsable API base template that can be used in your `api.html`. -* `blockbots` - `<meta>` tag that blocks crawlers * `bodyclass` - (empty) class attribute for the `<body>` * `bootstrap_theme` - CSS for the Bootstrap theme * `bootstrap_navbar_variant` - CSS class for the navbar * `branding` - section of the navbar, see [Bootstrap components][bcomponentsnav] * `breadcrumbs` - Links showing resource nesting, allowing the user to go back up the resources. It's recommended to preserve these, but they can be overridden using the breadcrumbs block. -* `extrastyle` - (empty) extra CSS for the page -* `extrahead` - (empty) extra markup for the page `<head>` * `footer` - Any copyright notices or similar footer materials can go here (by default right-aligned) -* `global_heading` - (empty) Use to insert content below the header but before the breadcrumbs. +* `style` - CSS stylesheets for the page * `title` - title of the page * `userlinks` - This is a list of links on the right of the header, by default containing login/logout links. To add links instead of replace, use {{ block.super }} to preserve the authentication links. diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 092bf2e4..8d807574 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -13,7 +13,7 @@ <title>{% block title %}Django REST framework{% endblock %}</title> {% block style %} - <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap.min.css" %}"/> + {% block bootstrap_theme %}<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap.min.css" %}"/>{% endblock %} <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap-tweaks.css" %}"/> <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/> <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/> |
