diff options
author | Dan McGee <dan@archlinux.org> | 2012-05-13 20:10:46 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-05-13 20:10:46 -0500 |
commit | a570c2c7fa404c2eb1760c6fb428047083c0c957 (patch) | |
tree | eb159ad63d57d3e3902e083c94a30f37c4f7cbf7 /mirrors/models.py | |
parent | 76516cae45f3d1080065608bdb8f2d086322012f (diff) |
Change mirror log error text to unlimited length
Use TextField rather than a limited-length CharField; leave it up to the
code filling this field to determine an appropriate length.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/models.py')
-rw-r--r-- | mirrors/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mirrors/models.py b/mirrors/models.py index 19437610..8c2bd7fc 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -44,6 +44,7 @@ class Mirror(models.Model): def get_absolute_url(self): return '/mirrors/%s/' % self.name + class MirrorProtocol(models.Model): protocol = models.CharField(max_length=10, unique=True) is_download = models.BooleanField(default=True, @@ -57,6 +58,7 @@ class MirrorProtocol(models.Model): class Meta: ordering = ('protocol',) + class MirrorUrl(models.Model): url = models.CharField("URL", max_length=255, unique=True) protocol = models.ForeignKey(MirrorProtocol, related_name="urls", @@ -104,6 +106,7 @@ class MirrorUrl(models.Model): class Meta: verbose_name = 'mirror URL' + class MirrorRsync(models.Model): ip = models.CharField("IP", max_length=24) mirror = models.ForeignKey(Mirror, related_name="rsync_ips") @@ -114,13 +117,14 @@ class MirrorRsync(models.Model): class Meta: verbose_name = 'mirror rsync IP' + class MirrorLog(models.Model): url = models.ForeignKey(MirrorUrl, related_name="logs") check_time = models.DateTimeField(db_index=True) last_sync = models.DateTimeField(null=True) duration = models.FloatField(null=True) is_success = models.BooleanField(default=True) - error = models.CharField(max_length=255, blank=True, default='') + error = models.TextField(blank=True, default='') def __unicode__(self): return "Check of %s at %s" % (self.url.url, self.check_time) |