Download and cache campaign, benefit, and reward images locally
This commit is contained in:
parent
f4925b8e45
commit
55c2273e27
7 changed files with 346 additions and 266 deletions
|
|
@ -0,0 +1,36 @@
|
|||
# Generated by Django 6.0.2 on 2026-02-11 22:55
|
||||
from __future__ import annotations
|
||||
|
||||
from django.db import migrations
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"""Add image_file and image_url fields to RewardCampaign model for storing local file and original URL of campaign images.""" # noqa: E501
|
||||
|
||||
dependencies = [
|
||||
("twitch", "0009_alter_chatbadge_badge_set_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="rewardcampaign",
|
||||
name="image_file",
|
||||
field=models.FileField(
|
||||
blank=True,
|
||||
help_text="Locally cached reward campaign image served from this site.",
|
||||
null=True,
|
||||
upload_to="reward_campaigns/images/",
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="rewardcampaign",
|
||||
name="image_url",
|
||||
field=models.URLField(
|
||||
blank=True,
|
||||
default="",
|
||||
help_text="URL to an image representing the reward campaign.",
|
||||
max_length=500,
|
||||
),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue