diff options
| author | Tom Christie | 2014-08-18 20:28:34 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-08-18 20:28:34 +0100 |
| commit | c092b4df7873b1bf9ead5ac65406f1347d4c4365 (patch) | |
| tree | 0ccde98a935643264c037f62b6ef6f9c86f452d7 | |
| parent | 3b899c9d573535232c1dd467dfa8f07714c569b8 (diff) | |
| parent | b4c7717cb80cb13a2f13aae8855e226685306880 (diff) | |
| download | django-rest-framework-c092b4df7873b1bf9ead5ac65406f1347d4c4365.tar.bz2 | |
Merge pull request #1641 from javins/login-title
Refactor login template to extend base.
| -rw-r--r-- | docs/topics/browsable-api.md | 1 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/base.html | 2 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/login_base.html | 15 |
3 files changed, 6 insertions, 12 deletions
diff --git a/docs/topics/browsable-api.md b/docs/topics/browsable-api.md index 96cdabe6..ad812f4b 100644 --- a/docs/topics/browsable-api.md +++ b/docs/topics/browsable-api.md @@ -69,6 +69,7 @@ For more specific CSS tweaks than simply overriding the default bootstrap theme All of the blocks available in the browsable API base template that can be used in your `api.html`. +* `body` - The entire html `<body>`. * `bodyclass` - Class attribute for the `<body>` tag, empty by default. * `bootstrap_theme` - CSS for the Bootstrap theme. * `bootstrap_navbar_variant` - CSS class for the navbar. diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index e96fa8ec..ee96b6ee 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -24,6 +24,7 @@ {% endblock %} </head> + {% block body %} <body class="{% block bodyclass %}{% endblock %} container"> <div class="wrapper"> @@ -230,4 +231,5 @@ <script src="{% static "rest_framework/js/default.js" %}"></script> {% endblock %} </body> + {% endblock %} </html> diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index be9a0072..312a1138 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -1,17 +1,8 @@ +{% extends "rest_framework/base.html" %} {% load url from future %} {% load rest_framework %} -<html> - - <head> - {% block style %} - {% block bootstrap_theme %} - <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap.min.css" %}"/> - <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap-tweaks.css" %}"/> - {% endblock %} - <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/> - {% endblock %} - </head> + {% block body %} <body class="container"> <div class="container-fluid" style="margin-top: 30px"> @@ -50,4 +41,4 @@ </div><!-- /.row-fluid --> </div><!-- /.container-fluid --> </body> -</html> + {% endblock %} |
