Remove the Zone class. It's not needed since we get the zones at run time
This commit is contained in:
parent
5c55c53b4c
commit
f95ac516e1
|
@ -1,12 +1,11 @@
|
||||||
from bcommon.models import BindServer, Key, Zone
|
from bcommon.models import BindServer, Key
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
class ZoneAdmin(admin.ModelAdmin):
|
class ZoneAdmin(admin.ModelAdmin):
|
||||||
list_display = [ 'zone_name', 'server']
|
list_display = [ 'zone_name', 'server', 'key' ]
|
||||||
|
|
||||||
class KeyAdmin(admin.ModelAdmin):
|
class KeyAdmin(admin.ModelAdmin):
|
||||||
list_display = [ 'name', 'data' ]
|
list_display = [ 'name', 'data' ]
|
||||||
|
|
||||||
admin.site.register(BindServer)
|
admin.site.register(BindServer)
|
||||||
admin.site.register(Key, KeyAdmin)
|
admin.site.register(Key, KeyAdmin)
|
||||||
admin.site.register(Zone, ZoneAdmin)
|
|
||||||
|
|
|
@ -15,10 +15,3 @@ class Key(models.Model):
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
class Zone(models.Model):
|
|
||||||
server = models.ForeignKey('BindServer')
|
|
||||||
zone_name = models.CharField(max_length=50)
|
|
||||||
|
|
||||||
def __unicode__(self):
|
|
||||||
return self.zone_name
|
|
||||||
|
|
Loading…
Reference in New Issue