From ff02a0af9c8d2dadebfadcc65e17adae3b0bd111 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Wed, 3 Dec 2014 17:29:06 +0700 Subject: [PATCH 1/3] Fixed display issues with tooltips. --- rest_framework/static/rest_framework/js/default.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest_framework/static/rest_framework/js/default.js b/rest_framework/static/rest_framework/js/default.js index bcb1964db..c8812132c 100644 --- a/rest_framework/static/rest_framework/js/default.js +++ b/rest_framework/static/rest_framework/js/default.js @@ -24,7 +24,8 @@ prettyPrint(); // Bootstrap tooltips. $('.js-tooltip').tooltip({ - delay: 1000 + delay: 1000, + container: 'body' }); // Deal with rounded tab styling after tab clicks. From b90f4228b274abc3010b159d6abe7b2381067253 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Wed, 3 Dec 2014 17:30:07 +0700 Subject: [PATCH 2/3] Ported a couple of templates to Bootstrap 3.x. --- .../templates/rest_framework/login_base.html | 23 +++++++++---------- .../rest_framework/raw_data_form.html | 8 +++---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index e050cbdc4..8e6240a68 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -21,11 +21,11 @@ {% csrf_token %}
-
- - + + {% if form.username.errors %} @@ -36,12 +36,11 @@
-
- - +
+ + {% if form.password.errors %}

@@ -56,8 +55,8 @@

{{ error }}
{% endfor %} {% endif %} -
- +
+
diff --git a/rest_framework/templates/rest_framework/raw_data_form.html b/rest_framework/templates/rest_framework/raw_data_form.html index 075279f7e..b4c9f1a11 100644 --- a/rest_framework/templates/rest_framework/raw_data_form.html +++ b/rest_framework/templates/rest_framework/raw_data_form.html @@ -2,10 +2,10 @@ {% csrf_token %} {{ form.non_field_errors }} {% for field in form %} -
- {{ field.label_tag|add_class:"control-label" }} -
- {{ field }} +
+ {{ field.label_tag|add_class:"col-sm-2 control-label" }} +
+ {{ field|add_class:"form-control" }} {{ field.help_text }}
From 0c0d65d23294d6976a3d7f9d47eb4b67440e908e Mon Sep 17 00:00:00 2001 From: Victor Cabral Date: Sun, 7 Dec 2014 15:05:17 -0500 Subject: [PATCH 3/3] Fixed unit test for auth login --- tests/test_authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_authentication.py b/tests/test_authentication.py index 28c3a8b35..44837c4ef 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -142,7 +142,7 @@ class SessionAuthTests(TestCase): cf. [#1810](https://github.com/tomchristie/django-rest-framework/pull/1810) """ response = self.csrf_client.get('/auth/login/') - self.assertContains(response, '') + self.assertContains(response, '') def test_post_form_session_auth_failing_csrf(self): """