diff options
| author | Jannis Leidel <jannis@leidel.info> | 2010-10-01 02:02:58 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2010-10-01 02:02:58 +0000 |
| commit | 392d992f8295f96632179e01e790465cc9c8d3ec (patch) | |
| tree | bc1d6e3b0819f1b2a58a91d146fa6eb112d8396d /docs/ref | |
| parent | a64e96c227b36c701a86ded75d839b1cd2442713 (diff) | |
Fixed #7048 -- Added ClearableFileInput widget to clear file fields. Thanks for report and patch, jarrow and Carl Meyer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/forms/fields.txt | 4 | ||||
| -rw-r--r-- | docs/ref/forms/widgets.txt | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 0dd9095a77..d2b1c303ed 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -507,7 +507,7 @@ given length. .. class:: FileField(**kwargs) - * Default widget: ``FileInput`` + * Default widget: ``ClearableFileInput`` * Empty value: ``None`` * Normalizes to: An ``UploadedFile`` object that wraps the file content and file name into a single object. @@ -573,7 +573,7 @@ These control the range of values permitted in the field. .. class:: ImageField(**kwargs) - * Default widget: ``FileInput`` + * Default widget: ``ClearableFileInput`` * Empty value: ``None`` * Normalizes to: An ``UploadedFile`` object that wraps the file content and file name into a single object. diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 05215d4d8e..c01a7368bd 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -46,6 +46,14 @@ commonly used groups of widgets: File upload input: ``<input type='file' ...>`` +.. class:: ClearableFileInput + + .. versionadded:: 1.3 + + File upload input: ``<input type='file' ...>``, with an additional checkbox + input to clear the field's value, if the field is not required and has + initial data. + .. class:: DateInput .. versionadded:: 1.1 |
