From c6e1e5d59287543feae961a33b52cd1815a0b4c0 Mon Sep 17 00:00:00 2001 From: Jeffrey Forman Date: Fri, 15 Apr 2011 19:31:41 -0400 Subject: [PATCH] Add root url '/' page with link to server list --- binder/bcommon/views.py | 5 ++--- binder/templates/index.htm | 9 +++++++++ binder/urls.py | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 binder/templates/index.htm diff --git a/binder/bcommon/views.py b/binder/bcommon/views.py index 71332ea..8b7388e 100644 --- a/binder/bcommon/views.py +++ b/binder/bcommon/views.py @@ -12,9 +12,8 @@ import dns.query import dns.zone import socket -def binder_index(request): - return render_to_response('bcommon/index.htm', - { 'server_list' : server_list }) +def home_index(request): + return render_to_response('index.htm') def list_servers(request): server_list = BindServer.objects.all().order_by('hostname') diff --git a/binder/templates/index.htm b/binder/templates/index.htm new file mode 100644 index 0000000..e7fda9f --- /dev/null +++ b/binder/templates/index.htm @@ -0,0 +1,9 @@ +{% include "base.htm" %} + +{% block body %} + + + +{% endblock body %} diff --git a/binder/urls.py b/binder/urls.py index 740c900..88fdf4a 100644 --- a/binder/urls.py +++ b/binder/urls.py @@ -7,7 +7,7 @@ admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), - + (r'^$', 'bcommon.views.home_index'), (r'^info/$', 'bcommon.views.list_servers'), (r'^info/(?P[a-zA-Z0-9.-]+)/$', 'bcommon.views.list_server_zones'), (r'^info/(?P[a-zA-Z0-9.-]+)/(?P[a-zA-Z0-9.-]+)/$', 'bcommon.views.list_zone'),