Skip to content

Commit

Permalink
Add cleanup functionality to url_download field
Browse files Browse the repository at this point in the history
  • Loading branch information
FinemechanicPub committed Jul 30, 2023
1 parent 28d0f54 commit 6598127
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/library/models/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from django.utils.translation import gettext_lazy as _

from apps.content_pages.utilities import path_by_media_and_class_name
from apps.core.mixins import ImageCleanUpMixin
from apps.core.models import BaseModel
from apps.core.utils import slugify
from apps.info.models import Festival
Expand Down Expand Up @@ -46,7 +47,8 @@ def save(self, *args, **kwargs):
)


class Play(BaseModel):
class Play(ImageCleanUpMixin, BaseModel):
cleanup_fields = ("url_download",)
name = models.CharField(
max_length=200,
verbose_name="Название пьесы",
Expand Down

0 comments on commit 6598127

Please sign in to comment.