2010-10-31 12:26:23 +00:00
|
|
|
from django.db import models
|
|
|
|
|
2010-11-04 12:23:55 +00:00
|
|
|
from pyi2phosts.lib.validation import validate_i2purl
|
2010-10-31 12:26:23 +00:00
|
|
|
|
|
|
|
class ExternalSource(models.Model):
|
2015-10-26 18:55:35 +00:00
|
|
|
name = models.CharField(max_length=128, unique=True)
|
|
|
|
url = models.CharField(max_length=256, validators=[validate_i2purl])
|
|
|
|
description = models.CharField(max_length=512, blank=True)
|
|
|
|
last_modified = models.DateTimeField(null=True, blank=True)
|
|
|
|
last_success = models.DateTimeField(null=True, blank=True)
|
|
|
|
etag = models.CharField(max_length=256, blank=True)
|
|
|
|
active = models.BooleanField(default=True)
|
2010-10-31 12:26:23 +00:00
|
|
|
|
2015-10-26 18:55:35 +00:00
|
|
|
def __unicode__(self):
|
|
|
|
return self.name
|
2010-10-31 12:26:23 +00:00
|
|
|
|