pad ids to len 7 for storage

This commit is contained in:
j 2011-12-27 00:06:58 +05:30
commit d070cb616b
3 changed files with 4 additions and 3 deletions

View file

@ -772,6 +772,7 @@ class Item(models.Model):
def path(self, name=''):
h = self.itemId
h = (7-len(h))*'0' + h
return os.path.join('items', h[:2], h[2:4], h[4:6], h[6:], name)
'''