mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 20:44:55 +00:00
New app "extsources"
Now we keep external hosts.txt sources in django.
This commit is contained in:
parent
d9eb21932e
commit
3d38fbb9b0
16
web/extsources/models.py
Normal file
16
web/extsources/models.py
Normal file
@ -0,0 +1,16 @@
|
||||
from django.db import models
|
||||
|
||||
from web.lib.validation import validate_i2purl
|
||||
|
||||
class ExternalSource(models.Model):
|
||||
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)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user