Renaming all templates from *.htm to *.html
When using Djangos "makemessages" command to collect strings for i18n it only considers templates with a file extenions of .txt and .html by default. For more details see: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files Also when Django is refering to default template names (e.g. for error handling or accounts) it always refers to file names with .html as file extension. To avoid hassle in the future this commit aligns the file extension used for templates to Djangos default of .html.
This commit is contained in:
parent
8082262871
commit
8be9a4b2e3
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Add CNAME record for {{ originating_record }}{% endblock pageheader %}
|
{% block pageheader %}Add CNAME record for {{ originating_record }}{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Add record in {{ zone_name }}{% endblock pageheader %}
|
{% block pageheader %}Add record in {{ zone_name }}{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Delete record(s) in {{ zone_name }}{% endblock pageheader %}
|
{% block pageheader %}Delete record(s) in {{ zone_name }}{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Server Zone List for {{ dns_server.hostname }}{% endblock pageheader %}
|
{% block pageheader %}Server Zone List for {{ dns_server.hostname }}{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Server List{% endblock pageheader %}
|
{% block pageheader %}Server List{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Zone listing for {{ zone_name }} on {{ dns_server.hostname }}{% endblock pageheader %}
|
{% block pageheader %}Zone listing for {{ zone_name }} on {{ dns_server.hostname }}{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Record Result{% endblock pageheader %}
|
{% block pageheader %}Record Result{% endblock pageheader %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.htm" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block pageheader %}Home{% endblock pageheader %}
|
{% block pageheader %}Home{% endblock pageheader %}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import local_settings
|
||||||
|
|
||||||
def home_index(request):
|
def home_index(request):
|
||||||
""" List the main index page for Binder. """
|
""" List the main index page for Binder. """
|
||||||
return render(request, "index.htm")
|
return render(request, "index.html")
|
||||||
|
|
||||||
|
|
||||||
def view_server_list(request):
|
def view_server_list(request):
|
||||||
|
@ -19,7 +19,7 @@ def view_server_list(request):
|
||||||
for current in server_list:
|
for current in server_list:
|
||||||
server_info.append({"host_name" : current, "ip_address" : helpers.ip_info(current.hostname)})
|
server_info.append({"host_name" : current, "ip_address" : helpers.ip_info(current.hostname)})
|
||||||
|
|
||||||
return render(request, "bcommon/list_servers.htm",
|
return render(request, "bcommon/list_servers.html",
|
||||||
{ "server_info" : server_info})
|
{ "server_info" : server_info})
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ def view_server_zones(request, dns_server):
|
||||||
except exceptions.ZoneException, err:
|
except exceptions.ZoneException, err:
|
||||||
errors = "Unable to list server zones. Error: %s" % err
|
errors = "Unable to list server zones. Error: %s" % err
|
||||||
|
|
||||||
return render(request, "bcommon/list_server_zones.htm",
|
return render(request, "bcommon/list_server_zones.html",
|
||||||
{ "errors" : errors,
|
{ "errors" : errors,
|
||||||
"dns_server" : this_server,
|
"dns_server" : this_server,
|
||||||
"zone_array" : zone_array})
|
"zone_array" : zone_array})
|
||||||
|
@ -51,14 +51,14 @@ def view_zone_records(request, dns_server, zone_name):
|
||||||
try:
|
try:
|
||||||
zone_array = this_server.list_zone_records(zone_name)
|
zone_array = this_server.list_zone_records(zone_name)
|
||||||
except exceptions.TransferException, err:
|
except exceptions.TransferException, err:
|
||||||
return render(request, "bcommon/list_zone.htm",
|
return render(request, "bcommon/list_zone.html",
|
||||||
{ "errors" : err,
|
{ "errors" : err,
|
||||||
"zone_name" : zone_name,
|
"zone_name" : zone_name,
|
||||||
"dns_server" : this_server})
|
"dns_server" : this_server})
|
||||||
except models.BindServer.DoesNotExist:
|
except models.BindServer.DoesNotExist:
|
||||||
errors = "Requesting a zone listing for a Bind server that is not configured: %s" % dns_server
|
errors = "Requesting a zone listing for a Bind server that is not configured: %s" % dns_server
|
||||||
|
|
||||||
return render(request, "bcommon/list_zone.htm",
|
return render(request, "bcommon/list_zone.html",
|
||||||
{ "zone_array" : zone_array,
|
{ "zone_array" : zone_array,
|
||||||
"dns_server" : this_server,
|
"dns_server" : this_server,
|
||||||
"zone_name" : zone_name,
|
"zone_name" : zone_name,
|
||||||
|
@ -69,7 +69,7 @@ def view_add_record(request, dns_server, zone_name):
|
||||||
""" View to provide form to add a DNS record. """
|
""" View to provide form to add a DNS record. """
|
||||||
this_server = models.BindServer.objects.get(hostname=dns_server)
|
this_server = models.BindServer.objects.get(hostname=dns_server)
|
||||||
|
|
||||||
return render(request, "bcommon/add_record_form.htm",
|
return render(request, "bcommon/add_record_form.html",
|
||||||
{ "dns_server" : this_server,
|
{ "dns_server" : this_server,
|
||||||
"zone_name" : zone_name,
|
"zone_name" : zone_name,
|
||||||
"tsig_keys" : models.Key.objects.all(),
|
"tsig_keys" : models.Key.objects.all(),
|
||||||
|
@ -109,13 +109,13 @@ def view_add_record_result(request):
|
||||||
# What would cause this?
|
# What would cause this?
|
||||||
errors = err
|
errors = err
|
||||||
|
|
||||||
return render(request, "bcommon/response_result.htm",
|
return render(request, "bcommon/response_result.html",
|
||||||
{ "errors" : errors,
|
{ "errors" : errors,
|
||||||
"response" : response })
|
"response" : response })
|
||||||
|
|
||||||
dns_server = models.BindServer.objects.get(hostname=request.POST["dns_server"])
|
dns_server = models.BindServer.objects.get(hostname=request.POST["dns_server"])
|
||||||
|
|
||||||
return render(request, "bcommon/add_record_form.htm",
|
return render(request, "bcommon/add_record_form.html",
|
||||||
{ "dns_server" : dns_server,
|
{ "dns_server" : dns_server,
|
||||||
"zone_name" : request.POST["zone_name"],
|
"zone_name" : request.POST["zone_name"],
|
||||||
"tsig_keys" : models.Key.objects.all(),
|
"tsig_keys" : models.Key.objects.all(),
|
||||||
|
@ -130,7 +130,7 @@ def view_add_cname_record(request, dns_server, zone_name, record_name):
|
||||||
|
|
||||||
this_server = models.BindServer.objects.get(hostname=dns_server)
|
this_server = models.BindServer.objects.get(hostname=dns_server)
|
||||||
|
|
||||||
return render(request, "bcommon/add_cname_record_form.htm",
|
return render(request, "bcommon/add_cname_record_form.html",
|
||||||
{ "dns_server" : this_server,
|
{ "dns_server" : this_server,
|
||||||
"originating_record" : "%s.%s" % (record_name, zone_name),
|
"originating_record" : "%s.%s" % (record_name, zone_name),
|
||||||
"zone_name" : zone_name,
|
"zone_name" : zone_name,
|
||||||
|
@ -159,13 +159,13 @@ def view_add_cname_result(request):
|
||||||
except exceptions.RecordException, err:
|
except exceptions.RecordException, err:
|
||||||
errors = err
|
errors = err
|
||||||
|
|
||||||
return render(request, "bcommon/response_result.htm",
|
return render(request, "bcommon/response_result.html",
|
||||||
{"response" : add_cname_response,
|
{"response" : add_cname_response,
|
||||||
"errors" : errors })
|
"errors" : errors })
|
||||||
|
|
||||||
dns_server = models.BindServer.objects.get(hostname=request.POST["dns_server"])
|
dns_server = models.BindServer.objects.get(hostname=request.POST["dns_server"])
|
||||||
|
|
||||||
return render(request, "bcommon/add_cname_record_form.htm",
|
return render(request, "bcommon/add_cname_record_form.html",
|
||||||
{ "dns_server" : dns_server,
|
{ "dns_server" : dns_server,
|
||||||
"zone_name" : request.POST["zone_name"],
|
"zone_name" : request.POST["zone_name"],
|
||||||
"record_name" : request.POST["cname"],
|
"record_name" : request.POST["cname"],
|
||||||
|
@ -185,7 +185,7 @@ def view_delete_record(request):
|
||||||
zone_name = request.POST["zone_name"]
|
zone_name = request.POST["zone_name"]
|
||||||
rr_list = request.POST.getlist("rr_list")
|
rr_list = request.POST.getlist("rr_list")
|
||||||
|
|
||||||
return render(request, "bcommon/delete_record_initial.htm",
|
return render(request, "bcommon/delete_record_initial.html",
|
||||||
{ "dns_server" : dns_server,
|
{ "dns_server" : dns_server,
|
||||||
"zone_name" : zone_name,
|
"zone_name" : zone_name,
|
||||||
"rr_list" : rr_list,
|
"rr_list" : rr_list,
|
||||||
|
@ -210,5 +210,5 @@ def view_delete_result(request):
|
||||||
clean_form["rr_list"],
|
clean_form["rr_list"],
|
||||||
clean_form["key_name"])
|
clean_form["key_name"])
|
||||||
|
|
||||||
return render(request, "bcommon/response_result.htm",
|
return render(request, "bcommon/response_result.html",
|
||||||
{ "response" : delete_result })
|
{ "response" : delete_result })
|
||||||
|
|
Loading…
Reference in New Issue