def bcaw_home(): """BCAW application home page, test DB is synched and display home.""" # If there's a different number of images on disk than # in the DB table it's time to synch if DbSynch.is_synch_db(): DbSynch.synch_db() return render_template('home.html', db_images=Image.images())
def images_not_on_disk(cls): """Checks that images in the database are also on disk. Missing images are added to a member list, """ del cls.__not_on_disk__[:] for image in Image.images(): if not os.path.isfile(image.path): logging.debug("Image: " + image.path + " is no longer on disk.") cls.__not_on_disk__.append(image)