# HG changeset patch # User Brian Neal # Date 1273201009 0 # Node ID 77b606e0ad5f0aa089a5394ddb0d3c19b728e9c0 # Parent 0e7c7231dea9135fa6e9b6995a1fe77c9cb566d9 Fix #78: improve the download upload_to path. diff -r 0e7c7231dea9 -r 77b606e0ad5f gpp/downloads/models.py --- a/gpp/downloads/models.py Wed May 05 03:24:14 2010 +0000 +++ b/gpp/downloads/models.py Fri May 07 02:56:49 2010 +0000 @@ -33,7 +33,9 @@ """ now = datetime.datetime.now() parts = ['downloads'] - parts.extend([str(p) for p in (now.year, now.month, now.day, now.microsecond)]) + parts.extend([str(p) for p in (now.year, now.month, now.day)]) + parts.append(hex((now.hour * 3600 + now.minute * 60 + now.second) * 1000 + ( + now.microsecond / 1000))[2:]) parts.append(filename) return os.path.join(*parts)