blob: 661c2525c9b07a593ea44b37853ab054f91e8831 [file] [log] [blame]
John H. Hartman642bfb42014-09-22 13:35:55 -07001from django.db import models
2from core.models import User, Service, SingletonModel, PlCoreBase
3import os
4from django.db import models
5from django.forms.models import model_to_dict
6
7
8# Create your models here.
9
10class RRService(SingletonModel,Service):
11
12 class Meta:
13 app_label = "rr"
14 verbose_name = "RR Service"
15
16class DNSName(PlCoreBase):
17 class Meta:
18 app_label = "rr"
19
20 cdn_prefix_id = models.IntegerField(null=True, blank=True)
21 prefix = models.CharField(max_length=200, help_text="DNS Name")
22 contentProvider = models.ForeignKey(ContentProvider)
23 description = models.TextField(max_length=254,null=True, blank=True,help_text="Description of DNS Name")
24
25 defaultOriginServer = models.ForeignKey(OriginServer, blank=True, null=True)
26 enabled = models.BooleanField(default=True)
27
28 def __unicode__(self): return u'%s' % (self.prefix)
29
30