coding utf-8 from django db import models class Domain models Model do

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- coding: utf-8 -*-
from django.db import models
class Domain(models.Model):
domain = models.CharField(max_length=200)
ttl = models.ForeignKey('Ttl', null=True)
registar = models.ForeignKey('Registar', null=True)
contract = models.ForeignKey('core.Contract', null=True)
def __unicode__(self):
return u'%s' % self.domain
class Registar(models.Model):
registar = models.CharField(max_length=200)
contract = models.BooleanField(default='False')
def __unicode__(self):
return u'%s' % self.registar
class Ttl(models.Model):
ttl = models.CharField(max_length=200)
def __unicode__(self):
return u'%s' % self.ttl