From 4eeb10e3ba3a3ae97b5dd2a813090b25c64b92c0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 23 Dec 2013 11:30:22 +0000 Subject: [PATCH] use AZ id for document data path --- pandora/document/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/document/models.py b/pandora/document/models.py index 5439858e..1de59369 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -143,7 +143,8 @@ class Document(models.Model): return response def path(self, name=''): - h = "%07d" % self.id + h = ox.toAZ(self.id) + h = (7-len(h))*'0' + h return os.path.join('documents', h[:2], h[2:4], h[4:6], h[6:], name) def save_chunk(self, chunk, chunk_id=-1, done=False):