mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
Auto delete image files when object has been deleted
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Generated by Django 4.2.20 on 2025-04-06 09:55
|
||||
# Generated by Django 4.2.20 on 2025-04-10 08:14
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
@ -25,7 +25,14 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
("uuid", models.UUIDField(db_index=True, unique=True)),
|
||||
("name", models.CharField(max_length=100)),
|
||||
("image", models.ImageField(upload_to="upload/%Y/%m/%d")),
|
||||
(
|
||||
"image",
|
||||
models.ImageField(
|
||||
height_field="height",
|
||||
upload_to="upload/%Y/%m/%d",
|
||||
width_field="width",
|
||||
),
|
||||
),
|
||||
(
|
||||
"created_at",
|
||||
models.DateTimeField(auto_now_add=True, verbose_name="created at"),
|
||||
|
Reference in New Issue
Block a user