update Content model
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled

This commit is contained in:
Corban-Lee Jones 2024-11-02 00:28:24 +00:00
parent 7445e0adc5
commit 05efa846f1
5 changed files with 114 additions and 2 deletions

View File

@ -346,5 +346,14 @@ class ContentSerializer(DynamicModelSerializer):
"item_guid",
"item_url",
"item_title",
"item_content_hash"
"item_description",
"item_content_hash",
"item_image_url",
"item_thumbnail_url",
"item_published",
"item_author",
"item_author_url",
"item_feed_title",
"item_feed_url",
"blocked"
)

View File

@ -0,0 +1,57 @@
# Generated by Django 5.0.4 on 2024-11-01 23:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0015_alter_subscription_message_style'),
]
operations = [
migrations.AddField(
model_name='content',
name='item_author',
field=models.CharField(default='', max_length=256),
preserve_default=False,
),
migrations.AddField(
model_name='content',
name='item_author_url',
field=models.URLField(blank=True, null=True),
),
migrations.AddField(
model_name='content',
name='item_description',
field=models.CharField(default='', max_length=1024),
preserve_default=False,
),
migrations.AddField(
model_name='content',
name='item_feed_title',
field=models.CharField(default='', max_length=1024),
preserve_default=False,
),
migrations.AddField(
model_name='content',
name='item_feed_url',
field=models.URLField(default=''),
preserve_default=False,
),
migrations.AddField(
model_name='content',
name='item_image_url',
field=models.URLField(blank=True, null=True),
),
migrations.AddField(
model_name='content',
name='item_published',
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name='content',
name='item_thumbnail_url',
field=models.URLField(blank=True, null=True),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 5.0.4 on 2024-11-01 23:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0016_content_item_author_content_item_author_url_and_more'),
]
operations = [
migrations.AddField(
model_name='content',
name='blocked',
field=models.BooleanField(default=False),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 5.0.4 on 2024-11-01 23:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0017_content_blocked'),
]
operations = [
migrations.AlterField(
model_name='content',
name='item_author',
field=models.CharField(blank=True, max_length=256, null=True),
),
]

View File

@ -273,7 +273,17 @@ class Content(models.Model):
item_guid = models.CharField(max_length=1024)
item_url = models.CharField(max_length=1024)
item_title = models.CharField(max_length=1024)
item_content_hash = models.CharField(max_length=1024)
item_description = models.CharField(max_length=1024)
item_content_hash = models.CharField(max_length=1024)
item_image_url = models.URLField(null=True, blank=True)
item_thumbnail_url = models.URLField(null=True, blank=True)
item_published = models.DateField(null=True, blank=True)
item_author = models.CharField(max_length=256, null=True, blank=True)
item_author_url = models.URLField(null=True, blank=True)
item_feed_title = models.CharField(max_length=1024)
item_feed_url = models.URLField()
blocked = models.BooleanField(default=False)
class Meta:
verbose_name = "content"