add support for article specific og image
This commit is contained in:
parent
1d190fe182
commit
6b689704b0
5 changed files with 49 additions and 6 deletions
25
hub/services/migrations/0045_add_og_image_to_article.py
Normal file
25
hub/services/migrations/0045_add_og_image_to_article.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 5.2 on 2025-07-08 13:53
|
||||
|
||||
import hub.services.models.base
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("services", "0044_add_svg_support"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="article",
|
||||
name="og_image",
|
||||
field=models.ImageField(
|
||||
blank=True,
|
||||
help_text="Optional Open Graph image for social sharing (max 1MB). If not provided, the article's main image will be used.",
|
||||
null=True,
|
||||
upload_to="article_og_images/",
|
||||
validators=[hub.services.models.base.validate_image_size],
|
||||
),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue