From c10569504baafa409dee4ef269d5a74d18786039 Mon Sep 17 00:00:00 2001 From: Jeffrey Forman Date: Wed, 13 Apr 2011 19:24:25 -0400 Subject: [PATCH] bcommon models are all set. servers, keys, zones --- binder/bcommon/models.py | 13 +++++++------ binder/bcommon/views.py | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 binder/bcommon/views.py diff --git a/binder/bcommon/models.py b/binder/bcommon/models.py index 3227213..4c5e23b 100644 --- a/binder/bcommon/models.py +++ b/binder/bcommon/models.py @@ -1,23 +1,24 @@ from django.db import models +import dns.query +import dns.zone + class BindServer(models.Model): - name = models.CharField(max_length=50) hostname = models.CharField(max_length=100) def __unicode__(self): - return self.name + return self.hostname class Key(models.Model): name = models.CharField(max_length=50) - data = models.TextField() + data = models.CharField(max_length=24) def __unicode__(self): return self.name class Zone(models.Model): server = models.ForeignKey('BindServer') - key = models.ForeignKey('Key') - name = models.CharField(max_length=50) + zone_name = models.CharField(max_length=50) def __unicode__(self): - return "%s: %s" % (self.server, self.name) + return self.zone_name diff --git a/binder/bcommon/views.py b/binder/bcommon/views.py deleted file mode 100644 index 60f00ef..0000000 --- a/binder/bcommon/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here.