From f9b1274edc5b0bc1c987b5c69378502d08b7916a Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 27 May 2011 15:43:30 +0530 Subject: [PATCH] added some cleanups --- edgware/editor/cleanups.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 edgware/editor/cleanups.py diff --git a/edgware/editor/cleanups.py b/edgware/editor/cleanups.py new file mode 100644 index 0000000..9122089 --- /dev/null +++ b/edgware/editor/cleanups.py @@ -0,0 +1,10 @@ +from os.path import exists, join +from editor.models import * +from settings import MEDIA_ROOT + + +def checkImages(): + for i in ImageBox.objects.all(): + full_path = join(MEDIA_ROOT, i.original_print()) + if not exists(full_path): + print full_path