#4776 closed (fixed)
Unicode branch merge and strftime in FileField upload_to
Description ¶
I experience file upload breakage after merger of the unicode branch.
The strftime function on line 738 in django/db/models/fields/init.py gave the following error:
TypeError: strftime() argument 1 must be str, not unicode
I have included a simple patch to byte-stringify the input to the strftime method... that may not be the best strategy to take.
Mike.
Change History (5)
by , 18 years ago
Attachment: | strftime_unicode.diff added |
---|
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 18 years ago
Owner: | changed from | to
---|
The patch is the right idea, although since it has very draconian error handling (Django will crash if self.upload_to is not ASCII), we need to verify that the value going in there really can only be ASCII.
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'll let the unicode ninjas decide how best to handle this...