make_slugs script

This commit is contained in:
Sanj 2012-02-22 17:28:27 +05:30
parent eb485d3110
commit a8c837b1dc

View File

@ -2,6 +2,11 @@ from django.template.defaultfilters import slugify
from mumbai.models import *
def clear_slugs():
for cls in [Road, Area, Stop]:
for obj in cls.objects.all():
obj.slug = ''
obj.save()
def do():
for cls in [Road, Area, Stop]: