Fixed #18840 - Added a mentioned of the upload_to parameter to the ModelForm example in file uploads.

This commit is contained in:
Tim Graham 2012-09-01 15:38:44 -04:00
parent 306d34873c
commit c6088bc91d
1 changed files with 3 additions and 1 deletions

View File

@ -183,7 +183,9 @@ Handling uploaded files with a model
If you're saving a file on a :class:`~django.db.models.Model` with a
:class:`~django.db.models.FileField`, using a :class:`~django.forms.ModelForm`
makes this process much easier. The file object will be saved when calling
makes this process much easier. The file object will be saved to the location
specified by the :attr:`~django.db.models.FileField.upload_to` argument of the
corresponding :class:`~django.db.models.FileField` when calling
``form.save()``::
from django.http import HttpResponseRedirect