diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/forms/fields.txt | 17 | ||||
| -rw-r--r-- | docs/ref/models/fields.txt | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 4956a71b44..fa5800692f 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -555,6 +555,23 @@ For each field, we describe the default widget used if you don't specify A regular expression pattern; only files with names matching this expression will be allowed as choices. + .. attribute:: allow_files + + .. versionadded:: 1.5 + + Optional. Either ``True`` or ``False``. Default is ``True``. Specifies + whether files in the specified location should be included. Either this or + :attr:`allow_folders` must be ``True``. + + .. attribute:: allow_folders + + .. versionadded:: 1.5 + + Optional. Either ``True`` or ``False``. Default is ``False``. Specifies + whether folders in the specified location should be included. Either this or + :attr:`allow_files` must be ``True``. + + ``FloatField`` ~~~~~~~~~~~~~~ diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 5521a0ed24..d1f12ffc95 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -691,6 +691,23 @@ directory on the filesystem. Has three special arguments, of which the first is Optional. Either ``True`` or ``False``. Default is ``False``. Specifies whether all subdirectories of :attr:`~FilePathField.path` should be included +.. attribute:: FilePathField.allow_files + + .. versionadded:: 1.5 + + Optional. Either ``True`` or ``False``. Default is ``True``. Specifies + whether files in the specified location should be included. Either this or + :attr:`~FilePathField.allow_folders` must be ``True``. + +.. attribute:: FilePathField.allow_folders + + .. versionadded:: 1.5 + + Optional. Either ``True`` or ``False``. Default is ``False``. Specifies + whether folders in the specified location should be included. Either this + or :attr:`~FilePathField.allow_files` must be ``True``. + + Of course, these arguments can be used together. The one potential gotcha is that :attr:`~FilePathField.match` applies to the |
