aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2013-04-17 14:15:19 -0700
committerTom Christie2013-04-17 14:15:19 -0700
commited7906c63da1287dfad391442c57a90888e69fce (patch)
treee0cd5b082b876513b010985addd942abdab9fc47 /rest_framework
parentea55143a2308b396c8df6f59a0f6d663c1067163 (diff)
parentf7fdcd55e451e4a37c518e1916dc2be513edbab5 (diff)
downloaddjango-rest-framework-ed7906c63da1287dfad391442c57a90888e69fce.tar.bz2
Merge pull request #794 from forgingdestiny/master
Add branding block to login template
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/templates/rest_framework/login.html54
-rw-r--r--rest_framework/templates/rest_framework/login_base.html55
2 files changed, 57 insertions, 52 deletions
diff --git a/rest_framework/templates/rest_framework/login.html b/rest_framework/templates/rest_framework/login.html
index e10ce20f..b7629327 100644
--- a/rest_framework/templates/rest_framework/login.html
+++ b/rest_framework/templates/rest_framework/login.html
@@ -1,53 +1,3 @@
-{% load url from future %}
-{% load rest_framework %}
-<html>
+{% extends "rest_framework/login_base.html" %}
- <head>
- <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" %}"/>
- <link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
- </head>
-
- <body class="container">
-
-<div class="container-fluid" style="margin-top: 30px">
- <div class="row-fluid">
-
- <div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
- <div class="row-fluid">
- <div>
- <h3 style="margin: 0 0 20px;">Django REST framework</h3>
- </div>
- </div><!-- /row fluid -->
-
- <div class="row-fluid">
- <div>
- <form action="{% url 'rest_framework:login' %}" class=" form-inline" method="post">
- {% csrf_token %}
- <div id="div_id_username" class="clearfix control-group">
- <div class="controls">
- <Label class="span4">Username:</label>
- <input style="height: 25px" type="text" name="username" maxlength="100" autocapitalize="off" autocorrect="off" class="textinput textInput" id="id_username">
- </div>
- </div>
- <div id="div_id_password" class="clearfix control-group">
- <div class="controls">
- <Label class="span4">Password:</label>
- <input style="height: 25px" type="password" name="password" maxlength="100" autocapitalize="off" autocorrect="off" class="textinput textInput" id="id_password">
- </div>
- </div>
- <input type="hidden" name="next" value="{{ next }}" />
- <div class="form-actions-no-box">
- <input type="submit" name="submit" value="Log in" class="btn btn-primary" id="submit-id-submit">
- </div>
- </form>
- </div>
- </div><!-- /row fluid -->
- </div><!--/span-->
-
- </div><!-- /.row-fluid -->
- </div>
-
- </div>
- </body>
-</html>
+{# Override this template in your own templates directory to customize #}
diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html
new file mode 100644
index 00000000..380d5820
--- /dev/null
+++ b/rest_framework/templates/rest_framework/login_base.html
@@ -0,0 +1,55 @@
+{% 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" %}"/>{% 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/default.css" %}"/>
+ {% endblock %}
+ </head>
+
+ <body class="container">
+
+<div class="container-fluid" style="margin-top: 30px">
+ <div class="row-fluid">
+
+ <div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
+ <div class="row-fluid">
+ <div>
+ {% block branding %}<h3 style="margin: 0 0 20px;">Django REST framework</h3>{% endblock %}
+ </div>
+ </div><!-- /row fluid -->
+
+ <div class="row-fluid">
+ <div>
+ <form action="{% url 'rest_framework:login' %}" class=" form-inline" method="post">
+ {% csrf_token %}
+ <div id="div_id_username" class="clearfix control-group">
+ <div class="controls">
+ <Label class="span4">Username:</label>
+ <input style="height: 25px" type="text" name="username" maxlength="100" autocapitalize="off" autocorrect="off" class="textinput textInput" id="id_username">
+ </div>
+ </div>
+ <div id="div_id_password" class="clearfix control-group">
+ <div class="controls">
+ <Label class="span4">Password:</label>
+ <input style="height: 25px" type="password" name="password" maxlength="100" autocapitalize="off" autocorrect="off" class="textinput textInput" id="id_password">
+ </div>
+ </div>
+ <input type="hidden" name="next" value="{{ next }}" />
+ <div class="form-actions-no-box">
+ <input type="submit" name="submit" value="Log in" class="btn btn-primary" id="submit-id-submit">
+ </div>
+ </form>
+ </div>
+ </div><!-- /row fluid -->
+ </div><!--/span-->
+
+ </div><!-- /.row-fluid -->
+ </div>
+
+ </div>
+ </body>
+</html>