use AZ urls

This commit is contained in:
j 2013-02-12 19:52:07 +05:30
parent e6c5194edd
commit 61ca7fabc1

View file

@ -17,7 +17,7 @@ from ox.django import fields
def new_slug(): def new_slug():
current_max = Item.objects.all().count() * 2 current_max = Item.objects.all().count() * 2
slug = ox.to32(random.randint(0, max(10, current_max))).capitalize() slug = ox.toAZ(random.randint(0, max(10, current_max))).capitalize()
if Item.objects.all().filter(slug=slug).count() > 0: if Item.objects.all().filter(slug=slug).count() > 0:
return new_slug() return new_slug()
return slug return slug