This commit is contained in:
Sanj 2011-05-27 15:47:34 +05:30
parent f9b1274edc
commit 7fc6cd215f

View File

@ -1,10 +1,12 @@
from os.path import exists, join from os.path import exists, join
from editor.models import * from editor.models import *
from settings import MEDIA_ROOT from settings import MEDIA_ROOT
import Image
def checkImages(): def checkImages():
for i in ImageBox.objects.all(): for i in ImageBox.objects.all():
full_path = join(MEDIA_ROOT, i.original_print()) full_path = join(MEDIA_ROOT, i.original_print())
if not exists(full_path): try:
x = Image.open(full_path)
except:
print full_path print full_path