Add root url '/' page with link to server list
This commit is contained in:
parent
597bb743c9
commit
c6e1e5d592
|
@ -12,9 +12,8 @@ import dns.query
|
||||||
import dns.zone
|
import dns.zone
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
def binder_index(request):
|
def home_index(request):
|
||||||
return render_to_response('bcommon/index.htm',
|
return render_to_response('index.htm')
|
||||||
{ 'server_list' : server_list })
|
|
||||||
|
|
||||||
def list_servers(request):
|
def list_servers(request):
|
||||||
server_list = BindServer.objects.all().order_by('hostname')
|
server_list = BindServer.objects.all().order_by('hostname')
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{% include "base.htm" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<a href="/info/">Server List</a>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% endblock body %}
|
|
@ -7,7 +7,7 @@ admin.autodiscover()
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
(r'^admin/', include(admin.site.urls)),
|
(r'^admin/', include(admin.site.urls)),
|
||||||
|
(r'^$', 'bcommon.views.home_index'),
|
||||||
(r'^info/$', 'bcommon.views.list_servers'),
|
(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.-]+)/$', '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'),
|
(r'^info/(?P<dns_hostname>[a-zA-Z0-9.-]+)/(?P<zone_name>[a-zA-Z0-9.-]+)/$', 'bcommon.views.list_zone'),
|
||||||
|
|
Loading…
Reference in New Issue