django/docs/ref
Andrew Gorcester f9ab543720 Fixed #20084 -- Provided option to validate formset max_num on server.
This is provided as a new "validate_max" formset_factory option defaulting to
False, since the non-validating behavior of max_num is longstanding, and there
is certainly code relying on it. (In fact, even the Django admin relies on it
for the case where there are more existing inlines than the given max_num). It
may be that at some point we want to deprecate validate_max=False and
eventually remove the option, but this commit takes no steps in that direction.

This also fixes the DoS-prevention absolute_max enforcement so that it causes a
form validation error rather than an IndexError, and ensures that absolute_max
is always 1000 more than max_num, to prevent surprising changes in behavior
with max_num close to absolute_max.

Lastly, this commit fixes the previous inconsistency between a regular formset
and a model formset in the precedence of max_num and initial data. Previously
in a regular formset, if the provided initial data was longer than max_num, it
was truncated; in a model formset, all initial forms would be displayed
regardless of max_num. Now regular formsets are the same as model formsets; all
initial forms are displayed, even if more than max_num. (But if validate_max is
True, submitting these forms will result in a "too many forms" validation
error!) This combination of behaviors was chosen to keep the max_num validation
simple and consistent, and avoid silent data loss due to truncation of initial
data.

Thanks to Preston for discussion of the design choices.
2013-03-21 01:27:24 -07:00
..
class-based-views Fixed #17094 - Typo in class-based views doc. 2013-02-23 08:52:33 -05:00
contrib Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
files Fixed typo in file storage docs. 2013-01-13 19:36:49 +01:00
forms Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
models Fixed #19968 -- Dropped support for PostgreSQL < 8.4. 2013-03-18 21:16:29 +01:00
templates Fixed #17906 - Autoescaping {% cycle %} and {% firstof %} templatetags. 2013-02-23 16:16:39 +01:00
clickjacking.txt Simplified default project template. 2013-02-04 13:21:36 +01:00
databases.txt Added warn note to docs about MySQL issues with 0000-00-00 date strings 2013-03-18 21:05:38 -03:00
django-admin.txt Fixed #17037 -- Added a --all option to diffsettings. 2013-03-18 00:03:58 +01:00
exceptions.txt Refactored database exceptions wrapping. 2013-02-27 17:26:54 +01:00
index.txt Fixed #19498 -- refactored auth documentation 2012-12-28 11:06:12 -08:00
middleware.txt Deprecated TransactionMiddleware and TRANSACTIONS_MANAGED. 2013-03-11 15:04:05 +01:00
request-response.txt Enabled database-level autocommit for all backends. 2013-03-11 14:48:54 +01:00
settings.txt small documentation update to outline caveat with SESSION_COOKIE_DOMAIN 2013-03-18 19:18:35 -07:00
signals.txt Added documentation for the 'db' argument of the post-syncdb signal. 2013-01-03 22:04:55 +01:00
template-response.txt Fixed #19692 -- Completed deprecation of mimetype in favor of content_type. 2013-01-31 13:54:40 +01:00
unicode.txt Fixed #19968 -- Dropped support for PostgreSQL < 8.4. 2013-03-18 21:16:29 +01:00
urlresolvers.txt Removed versionadded/changed annotations dating back to 1.4. 2012-12-29 21:59:08 +01:00
urls.txt Fixed #19516 - Fixed remaining broken links. 2013-01-02 18:32:57 -05:00
utils.txt Fixed #19577 - Added HTML escaping to admin examples. 2013-01-25 06:53:40 -05:00
validators.txt Fixed #4833 -- Validate email addresses with localhost as domain 2013-01-11 20:45:46 +01:00