Add: archive site source model
This commit is contained in:
parent
4b35b607f2
commit
eced37b877
1 changed files with 16 additions and 0 deletions
|
@ -1,2 +1,18 @@
|
|||
from django.db import models
|
||||
|
||||
|
||||
class SourceSiteModel(models.Model):
|
||||
slug = models.CharField(max_length=64)
|
||||
name = models.CharField(max_length=64)
|
||||
date_last_import = models.DateTimeField(auto_now=True)
|
||||
date_created = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Source Site"
|
||||
verbose_name_plural = "Source Sites"
|
||||
|
||||
def __str__(self):
|
||||
if self.name:
|
||||
return str(self.name)
|
||||
else:
|
||||
return str(self.slug)
|
||||
|
|
Loading…
Add table
Reference in a new issue