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.