(instance, filename)
return '{0}/{1}'.format(
        NEWS_IMAGES_STORAGE_PATH,
        filename.replace(' ', '-')
    )
Store the images in their own folder.

    This allows us to keep thumbnailed versions of all images.
Store the images in their own folder.
Store the images in their own folder .
def _news_images(instance, filename):
    """Store the images in their own folder.

    This allows us to keep thumbnailed versions of all images.
    """
    if instance.pk:
        return '{0}/{1}-{2}'.format(
            NEWS_IMAGES_STORAGE_PATH,
            str(instance.pk),
            filename.replace(' ', '-')
        )
    return '{0}/{1}'.format(
        NEWS_IMAGES_STORAGE_PATH,
        filename.replace(' ', '-')
    )
def _news_images ( instance , filename ) : if instance . pk : return '{0}/{1}-{2}' . format ( NEWS_IMAGES_STORAGE_PATH , str ( instance . pk ) , filename . replace ( ' ' , '-' ) ) return '{0}/{1}' . format ( NEWS_IMAGES_STORAGE_PATH , filename . replace ( ' ' , '-' ) )