From 3ed63a3c556065ffb399a74fad35d8458d95b44f Mon Sep 17 00:00:00 2001 From: Jeffrey Forman Date: Thu, 14 Apr 2011 22:08:22 -0400 Subject: [PATCH] Add initial static directory with rudimentary CSS for tables --- binder/settings.py | 1 - binder/static/style.css | 8 ++++++++ binder/templates/base.htm | 1 + binder/urls.py | 9 ++++++++- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 binder/static/style.css diff --git a/binder/settings.py b/binder/settings.py index 3b64136..4638d22 100644 --- a/binder/settings.py +++ b/binder/settings.py @@ -10,7 +10,6 @@ ADMINS = ( ) MANAGERS = ADMINS - DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. diff --git a/binder/static/style.css b/binder/static/style.css new file mode 100644 index 0000000..380dbbe --- /dev/null +++ b/binder/static/style.css @@ -0,0 +1,8 @@ +table { + border-collapse: collapse; +} + +table, th, td { + border: 1px solid black; +} + diff --git a/binder/templates/base.htm b/binder/templates/base.htm index bb25416..8518e63 100644 --- a/binder/templates/base.htm +++ b/binder/templates/base.htm @@ -2,6 +2,7 @@ {% block header %} Binder DNS Admin Tool + {% endblock header %} diff --git a/binder/urls.py b/binder/urls.py index 71ad2df..740c900 100644 --- a/binder/urls.py +++ b/binder/urls.py @@ -1,6 +1,7 @@ from django.conf.urls.defaults import * +from django.conf import settings +import os -# Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() @@ -11,3 +12,9 @@ urlpatterns = patterns('', (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'), ) + +if settings.DEBUG: + urlpatterns += patterns('', + (r'^static/(?P.*)$', 'django.views.static.serve', + {'document_root' : os.path.join(settings.SITE_ROOT, 'static')}), + )