Add root url '/' page with link to server list

This commit is contained in:
Jeffrey Forman 2011-04-15 19:31:41 -04:00
parent 597bb743c9
commit c6e1e5d592
3 changed files with 12 additions and 4 deletions

View File

@ -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')

View File

@ -0,0 +1,9 @@
{% include "base.htm" %}
{% block body %}
<ul>
<a href="/info/">Server List</a>
</ul>
{% endblock body %}

View File

@ -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<dns_hostname>[a-zA-Z0-9.-]+)/$', 'bcommon.views.list_server_zones'),
(r'^info/(?P<dns_hostname>[a-zA-Z0-9.-]+)/(?P<zone_name>[a-zA-Z0-9.-]+)/$', 'bcommon.views.list_zone'),