some util to clean empty categories

This commit is contained in:
Sanj 2011-07-01 21:00:25 +05:30
parent c6319ff71c
commit 557b3f389c

View File

@ -0,0 +1,8 @@
from files.models import *
def do():
for c in Category.objects.all():
if c.file_set.count() == 0:
print c.name
c.delete()