Apply 7a1e952a (partial): Add caption field to Images model

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-23 06:50:52 +00:00
parent 029c30ae70
commit 12c82e78f9
2 changed files with 19 additions and 0 deletions

View File

@@ -436,6 +436,7 @@ class Images(SoftDeletableModel, SiteSectorBaseModel):
image_url = models.CharField(max_length=500, blank=True, null=True, help_text="URL of the generated/stored image")
image_path = models.CharField(max_length=500, blank=True, null=True, help_text="Local path if stored locally")
prompt = models.TextField(blank=True, null=True, help_text="Image generation prompt used")
caption = models.TextField(blank=True, null=True, help_text="Image caption (40-60 words) to display with the image")
status = models.CharField(max_length=50, default='pending', help_text="Status: pending, generated, failed")
position = models.IntegerField(default=0, help_text="Position for in-article images ordering")
created_at = models.DateTimeField(auto_now_add=True)

View File

@@ -0,0 +1,18 @@
# Generated by Django on 2025-12-23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('writer', '0012_soft_delete'),
]
operations = [
migrations.AddField(
model_name='images',
name='caption',
field=models.TextField(blank=True, help_text='Image caption (40-60 words) to display with the image', null=True),
),
]