mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Create dedicated image upload model
This commit is contained in:
37
core/migrations/0045_quickuploadimage.py
Normal file
37
core/migrations/0045_quickuploadimage.py
Normal 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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user