Django Book 翻译
菜单>:
TOC
返回
原文:
2. Add the ``FileField`` or ``ImageField`` to your model, making sure to define the ``upload_to`` option to tell Django to which subdirectory of ``MEDIA_ROOT`` it should upload files.
翻译:
2. 在模型中添加 ``FileField`` 或者 ``ImageField`` ,务必要定义 ``upload_to`` 选项,这样Django才知道把上传的文件写到 ``MEDIA_ROOT`` 的哪个子目录中。
备注:
译者: