diff --git a/binder/bindercommon/__init__.py b/binder/bindercommon/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/binder/bindercommon/admin.py b/binder/bindercommon/admin.py new file mode 100644 index 0000000..5dda5c0 --- /dev/null +++ b/binder/bindercommon/admin.py @@ -0,0 +1,6 @@ +from bindercommon.models import BindServer, Key, Zone +from django.contrib import admin + +admin.site.register(BindServer) +admin.site.register(Key) +admin.site.register(Zone) diff --git a/binder/bindercommon/models.py b/binder/bindercommon/models.py new file mode 100644 index 0000000..3227213 --- /dev/null +++ b/binder/bindercommon/models.py @@ -0,0 +1,23 @@ +from django.db import models + +class BindServer(models.Model): + name = models.CharField(max_length=50) + hostname = models.CharField(max_length=100) + + def __unicode__(self): + return self.name + +class Key(models.Model): + name = models.CharField(max_length=50) + data = models.TextField() + + def __unicode__(self): + return self.name + +class Zone(models.Model): + server = models.ForeignKey('BindServer') + key = models.ForeignKey('Key') + name = models.CharField(max_length=50) + + def __unicode__(self): + return "%s: %s" % (self.server, self.name) diff --git a/binder/bindercommon/tests.py b/binder/bindercommon/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/binder/bindercommon/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/binder/bindercommon/views.py b/binder/bindercommon/views.py new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/binder/bindercommon/views.py @@ -0,0 +1 @@ +# Create your views here. diff --git a/binder/settings.py b/binder/settings.py index ed35c90..81f2886 100644 --- a/binder/settings.py +++ b/binder/settings.py @@ -95,4 +95,5 @@ INSTALLED_APPS = ( 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', + 'bindercommon', ) diff --git a/binder/zonemanager/__init__.py b/binder/zonemanager/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/binder/zonemanager/models.py b/binder/zonemanager/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/binder/zonemanager/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/binder/zonemanager/tests.py b/binder/zonemanager/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/binder/zonemanager/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/binder/zonemanager/views.py b/binder/zonemanager/views.py new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/binder/zonemanager/views.py @@ -0,0 +1 @@ +# Create your views here.