from django.core.management.base import BaseCommand

from pombola.core.models import Person

class Command(BaseCommand):

    def handle(self, **options):
        help = 'List the paths of primary person images relative to media root'

        for p in Person.objects.filter(hidden=False):
            image_file_field = p.primary_image()
            if not image_file_field:
                continue
            print image_file_field.name

Add a command to list all primary image filenames for people
Add a command to list all primary image filenames for people

This is useful to make a list of files to copy to your development copy
to make sure you don't have broken images on people pages, or pages that
list people.
