diff --git a/binder/bcommon/views.py b/binder/bcommon/views.py new file mode 100644 index 0000000..45fb71b --- /dev/null +++ b/binder/bcommon/views.py @@ -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 }) diff --git a/binder/settings.py b/binder/settings.py index 5f409af..3b64136 100644 --- a/binder/settings.py +++ b/binder/settings.py @@ -83,6 +83,7 @@ TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. + os.path.join(SITE_ROOT, 'templates') ) INSTALLED_APPS = ( diff --git a/binder/templates/base.htm b/binder/templates/base.htm new file mode 100644 index 0000000..bb25416 --- /dev/null +++ b/binder/templates/base.htm @@ -0,0 +1,19 @@ + +{% block header %} +
+