Add: importer source url model
This commit is contained in:
parent
2ad3db5454
commit
f0d3c7d7fe
2 changed files with 25 additions and 0 deletions
0
archivist/apps/importer/migrations/__init__.py
Normal file
0
archivist/apps/importer/migrations/__init__.py
Normal file
25
archivist/apps/importer/models.py
Normal file
25
archivist/apps/importer/models.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
from django.db import models
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from apps.sites.models import Category
|
||||
|
||||
from apps.user.models import UserProfile
|
||||
|
||||
class ImportSourceURLs(models.Model):
|
||||
url = models.URLField(unique=True)
|
||||
|
||||
category = models.ForeignKey(Category, on_delete=models.CASCADE)
|
||||
|
||||
added_by_user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
|
||||
|
||||
date_added = models.DateTimeField(auto_now_add=True, editable=True)
|
||||
|
||||
last_imported = models.DateTimeField(auto_now=True, editable=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Import Source URL")
|
||||
verbose_name_plural = _("Import Source URLs")
|
||||
|
||||
def __str__(self):
|
||||
return self.url
|
Loading…
Reference in a new issue