Source

gnocchi-gallery / gnocchi / gallery / management / commands / gallery_sync.py

1
2
3
4
5
6
7
8
9
from django.core.management.base import BaseCommand

from gnocchi.gallery.models import Gallery

class Command(BaseCommand):
    def handle(self, **kwargs):
        for gallery in Gallery.objects.all():
            gallery.sync_images()
        print "Done!"