Create dedicated image upload model

This commit is contained in:
2025-02-28 15:06:47 +01:00
parent 7b23196071
commit c236092c4f
9 changed files with 149 additions and 59 deletions

View File

@ -0,0 +1,37 @@
# Generated by Django 4.2.20 on 2025-04-05 16:28
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("core", "0044_alter_userban_options"),
]
operations = [
migrations.CreateModel(
name="QuickUploadImage",
fields=[
(
"uuid",
models.CharField(max_length=36, primary_key=True, serialize=False),
),
("name", models.CharField(max_length=100)),
("image", models.ImageField(upload_to="upload")),
("content_type", models.CharField(max_length=50)),
("date", models.DateTimeField(auto_now=True, verbose_name="date")),
(
"uploader",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="quick_uploads",
to=settings.AUTH_USER_MODEL,
),
),
],
),
]