def handle(self, *args, **options):
from_id = options.get('from_id', 1)
images = Image.objects.filter(id__gte=from_id).exclude(book=None).order_by('id')
images = images.filter(source_url__contains='flickr.com').exclude(download_url__endswith='_o.jpg')
for image in images:
def handle(self, *args, **options):
from_id = options.get('from_id', 1)
images = Image.objects.filter(id__gte=from_id).exclude(book=None).order_by('id')
images = images.filter(source_url__contains='flickr.com').exclude(download_url__endswith='_o.jpg')
for image in images: