Add: source type field to ImportSourceURLs model

This commit is contained in:
Aroy-Art 2024-07-13 23:37:56 +02:00
parent ec022ad331
commit 3b59a61178
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -7,6 +7,12 @@ from apps.sites.models import Category
from apps.user.models import UserProfile
class ImportSourceURLs(models.Model):
SOURCE_TYPES = (
('C', 'Complete User'),
('P', 'Singel Post'),
)
url = models.URLField(unique=True)
category = models.ForeignKey(Category, on_delete=models.CASCADE)
@ -17,6 +23,8 @@ class ImportSourceURLs(models.Model):
last_imported = models.DateTimeField(editable=True, blank=True, null=True)
source_type = models.CharField(max_length=1, choices=SOURCE_TYPES, default=None)
class Meta:
verbose_name = _("Import Source URL")
verbose_name_plural = _("Import Source URLs")