3 from django.conf import settings
6 def get_image_folders():
7 return [fn for fn in os.listdir(settings.IMAGE_DIR) if not fn.startswith('.')]
10 def get_images_from_folder(folder):
11 return ['/media/images/' + folder + '/' + fn for fn
12 in os.listdir(os.path.join(settings.IMAGE_DIR, folder))
13 if not fn.startswith('.')]