mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-20 15:10:23 +00:00
14 lines
441 B
Python
14 lines
441 B
Python
from django.core.management.base import BaseCommand
|
|
from django.db.models.loading import cache
|
|
from ...utils import invalidate_app_cache
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = ('Invalidates the image cache for a list of apps.')
|
|
args = '[apps]'
|
|
requires_model_validation = True
|
|
can_import_settings = True
|
|
|
|
def handle(self, *args, **options):
|
|
apps = args or cache.app_models.keys()
|
|
invalidate_app_cache(apps)
|