/info now works listing the dns servers configured, each linked as well
This commit is contained in:
parent
c10569504b
commit
03ce6bb7db
|
@ -0,0 +1,10 @@
|
||||||
|
# bcommon views
|
||||||
|
|
||||||
|
from bcommon.models import BindServer
|
||||||
|
from django.template import Context
|
||||||
|
from django.shortcuts import render_to_response
|
||||||
|
|
||||||
|
def list_servers(request):
|
||||||
|
server_list = BindServer.objects.all().order_by('hostname')
|
||||||
|
return render_to_response('bcommon/list_servers.htm',
|
||||||
|
{ 'server_list' : server_list })
|
|
@ -83,6 +83,7 @@ TEMPLATE_DIRS = (
|
||||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||||
# Always use forward slashes, even on Windows.
|
# Always use forward slashes, even on Windows.
|
||||||
# Don't forget to use absolute paths, not relative paths.
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
os.path.join(SITE_ROOT, 'templates')
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<html>
|
||||||
|
{% block header %}
|
||||||
|
<head>
|
||||||
|
<title>Binder DNS Admin Tool</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
{% endblock header %}
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
{% endblock body %}
|
||||||
|
</body>
|
||||||
|
|
||||||
|
{% block footer %}
|
||||||
|
|
||||||
|
{% endblock footer %}
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,12 @@
|
||||||
|
{% extends "base.htm" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
list servers body
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{% for current_server in server_list %}
|
||||||
|
<li> <a href="/info/{{ current_server }}/"> {{ current_server }} </li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% endblock body %}
|
|
@ -5,12 +5,9 @@ from django.contrib import admin
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
# Example:
|
|
||||||
# (r'^binder/', include('binder.foo.urls')),
|
|
||||||
|
|
||||||
# Uncomment the admin/doc line below to enable admin documentation:
|
|
||||||
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
||||||
|
|
||||||
# Uncomment the next line to enable the admin:
|
|
||||||
(r'^admin/', include(admin.site.urls)),
|
(r'^admin/', include(admin.site.urls)),
|
||||||
|
|
||||||
|
(r'^info/$', 'bcommon.views.list_servers'),
|
||||||
|
# (r'^info/(?P<dns_hostname>[a-zA-Z0-9.]+)$', 'bcommon.views.list_server_zones'),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue