Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #22786 -- Documented value_from_datadict caveat

Thanks blueyed for the report and Tim Graham for the review.
  • Loading branch information...
commit 909015a51b98749cabb0d13f8ea0bf58ec707fa3 1 parent e98c551
@claudep claudep authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 docs/ref/forms/widgets.txt
View
7 docs/ref/forms/widgets.txt
@@ -230,7 +230,12 @@ foundation for custom widgets.
.. method:: value_from_datadict(data, files, name)
Given a dictionary of data and this widget's name, returns the value
- of this widget. Returns ``None`` if a value wasn't provided.
+ of this widget. ``files`` may contain data coming from
+ :attr:`request.FILES <django.http.HttpRequest.FILES>`. Returns ``None``
+ if a value wasn't provided. Note also that ``value_from_datadict`` may
+ be called more than once during handling of form data, so if you
+ customize it and add expensive processing, you should implement some
+ caching mechanism yourself.
.. class:: MultiWidget(widgets, attrs=None)
Please sign in to comment.
Something went wrong with that request. Please try again.