FileUpload---------------------------------------------
extra??????????????????????
ImageUploadField?FileUploadField?extra??????????????????
????
(linux??????????null???????????
Python????????????????????
UTF8??????????????????Windows????)
???????????????RFC????
???????????????????????
Support for the up-loading of non-ASCII character file name
Problem
When the file name composed only of non-ASCII character is passed to FileField and ImageField, the file name is mostly lost.
And the character number limitation of the column is exceeded by 100 times or less.
Ex.
eeeee.txt -> .txt
aaaaa.txt -> _.txt
aeaee.txt -> __.txt
ImprovementAdd the setting that specifies the field that preserves original file name.
When Field does this setting, an original file name is preserved in a specified field.
FileFiled( or ImageField) stores The file name encoded with punycode.
The purpose of preserving with punycode is to avoid collision of file name.
If the original file field is not set, it doesn't affect (backward compatibility).
Generic view for download by original file name.
If the original file name is not set, file download generic view downloads it by the file name that FileField preserves.
Usage Ex.
class TestModel(models.Model):
??? afile = models.FileField(upload_to='afile',original_filename_field='orgname')
??? orgname = models.CharField(blank=True, maxlength=100)
??? class Admin:
??????? pass
(r'^file/(P<object_id>.*)/$','django.views.generic.simple.file_download',
????????????????? dict(queryset=TestModel.objects.all(),file_field='afile')),
SLUG_FIELD-------------------------------------------------
slug_field?????JavaScript????
language?????????????
PHONE_NO_FIELD / STATE_FIELD?????? ----------------------------------
language???
ZIP_FIELD---------------------------------------------------
jklparse.xml??????????????
manage.py run script --------------------------------------------
???
//////////////////////////
?FePy
?>IronPython?????ADO?DBAPI2?????????---------
perezvon??? - FePy
http://allmovie4u.com/
?----------- ???????? --------------------
?SQL initdata????????????????
?>?????????????????
?template????????????????????
?>????????????????
?setup.py??????????????
?>Python Paste??????????????????
??FKField????
?>GenericForeignKey???