John H. Hartman | 642bfb4 | 2014-09-22 13:35:55 -0700 | [diff] [blame^] | 1 | from django.db import models |
| 2 | from core.models import User, Service, SingletonModel, PlCoreBase |
| 3 | import os |
| 4 | from django.db import models |
| 5 | from django.forms.models import model_to_dict |
| 6 | |
| 7 | |
| 8 | # Create your models here. |
| 9 | |
| 10 | class RRService(SingletonModel,Service): |
| 11 | |
| 12 | class Meta: |
| 13 | app_label = "rr" |
| 14 | verbose_name = "RR Service" |
| 15 | |
| 16 | class 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 | |