Cache images instead of serve from Twitch
This commit is contained in:
parent
d434eac74a
commit
b97118cffd
16 changed files with 340 additions and 30 deletions
29
twitch/migrations/0016_add_local_image_fields.py
Normal file
29
twitch/migrations/0016_add_local_image_fields.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"""Add local image FileFields to models for caching Twitch images."""
|
||||
|
||||
dependencies = [
|
||||
("twitch", "0015_alter_dropbenefitedge_benefit_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="game",
|
||||
name="box_art_file",
|
||||
field=models.FileField(blank=True, null=True, upload_to="games/box_art/"),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="dropcampaign",
|
||||
name="image_file",
|
||||
field=models.FileField(blank=True, null=True, upload_to="campaigns/images/"),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="dropbenefit",
|
||||
name="image_file",
|
||||
field=models.FileField(blank=True, null=True, upload_to="benefits/images/"),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue