From ff2f5abcb18650eba983c14fb4016c4b3ef06181 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Sat, 30 May 2015 16:42:59 +0200 Subject: [PATCH 1/3] Remove tests for checking DNS resolution The tests checking the DNS resolution aren't reliable as they rely on specific behavior of the DNS resolution on the local system. As they are reliable it makes no sense to keep them as they are currently. --- binder/tests/testHelpers.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 binder/tests/testHelpers.py diff --git a/binder/tests/testHelpers.py b/binder/tests/testHelpers.py deleted file mode 100644 index aad301d..0000000 --- a/binder/tests/testHelpers.py +++ /dev/null @@ -1,12 +0,0 @@ -from django.test import TestCase - -from binder import models, helpers - -class HelperTests(TestCase): - def test_ipinfo_ResolutionFail(self): - response = helpers.ip_info("foobar.doesnotexist.local") - self.assertEqual([['Error', u'Unable to resolve foobar.doesnotexist.local: [Errno -2] Name or service not known']], - response) - response = helpers.ip_info("localhost") - self.assertEqual([['IPv4 (1)', u'127.0.0.1']], - sorted(response)) From 5476314232dcff9810039902835e7784134cb1e9 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Sat, 30 May 2015 22:27:25 +0200 Subject: [PATCH 2/3] Replaces hardcoded links in templates with Djangos url tag. --- binder/templates/base.html | 2 +- binder/templates/bcommon/add_cname_record_form.html | 2 +- binder/templates/bcommon/add_record_form.html | 2 +- binder/templates/bcommon/delete_record_initial.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/binder/templates/base.html b/binder/templates/base.html index c14d653..2ac27fd 100644 --- a/binder/templates/base.html +++ b/binder/templates/base.html @@ -20,7 +20,7 @@ {% block navigation %} {% endblock navigation %} diff --git a/binder/templates/bcommon/add_cname_record_form.html b/binder/templates/bcommon/add_cname_record_form.html index a2d3bde..8991ba2 100644 --- a/binder/templates/bcommon/add_cname_record_form.html +++ b/binder/templates/bcommon/add_cname_record_form.html @@ -3,7 +3,7 @@ {% block pageheader %}Add CNAME record for {{ originating_record }}{% endblock pageheader %} {% block body %} -
{% csrf_token %} +{% csrf_token %} Create CNAME record
diff --git a/binder/templates/bcommon/add_record_form.html b/binder/templates/bcommon/add_record_form.html index 78bf651..4f46a05 100644 --- a/binder/templates/bcommon/add_record_form.html +++ b/binder/templates/bcommon/add_record_form.html @@ -3,7 +3,7 @@ {% block pageheader %}Add record in {{ zone_name }}{% endblock pageheader %} {% block body %} -{% csrf_token %} +{% csrf_token %} Create Record
diff --git a/binder/templates/bcommon/delete_record_initial.html b/binder/templates/bcommon/delete_record_initial.html index ff3c28c..df78019 100644 --- a/binder/templates/bcommon/delete_record_initial.html +++ b/binder/templates/bcommon/delete_record_initial.html @@ -3,7 +3,7 @@ {% block pageheader %}Delete record(s) in {{ zone_name }}{% endblock pageheader %} {% block body %} - + {% csrf_token %} From 9ed2be3b66eb6103f91057a81e890ceebcf8dad2 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Sun, 31 May 2015 08:10:19 +0200 Subject: [PATCH 3/3] Use the static template tag when refering to static files. --- binder/templates/base.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/binder/templates/base.html b/binder/templates/base.html index c14d653..8848916 100644 --- a/binder/templates/base.html +++ b/binder/templates/base.html @@ -1,3 +1,4 @@ +{% load static from staticfiles %} {% block header %} @@ -5,14 +6,14 @@ Binder DNS Admin - - + + {% endblock header %} - - + +