django1/docs/ref/contrib
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
..
admin Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that return a QuerySet. 2013-03-08 10:11:45 -05:00
comments Deprecated django.contrib.comments. 2013-03-11 15:38:40 -05:00
formtools Fixed #19880 - Fixed an error in the form wizard initial_dict example. 2013-02-23 15:26:41 -05:00
gis Update versions and links to source tarballs. 2013-03-18 15:55:32 -07:00
auth.txt Fixed #19960 -- Fixed sentence in contrib.auth signals docs 2013-03-01 22:15:23 +01:00
contenttypes.txt Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
csrf.txt Fixed #15808 -- Added optional HttpOnly flag to the CSRF Cookie. 2013-02-07 09:48:08 +01:00
flatpages.txt Fixed #19516 - Fixed remaining broken links. 2013-01-02 18:32:57 -05:00
humanize.txt Removed versionadded/changed annotations dating back to 1.4. 2012-12-29 21:59:08 +01:00
index.txt Removed django.contrib.markup. 2012-12-29 21:59:07 +01:00
messages.txt Fixed #16319 -- added SuccessMessageMixin to contrib.messages 2013-03-19 21:02:55 -07:00
redirects.txt Fixed #19779 -- Checked contrib.sites presence in RedirectFallbackMiddleware 2013-02-08 16:32:09 +01:00
sitemaps.txt Fixed #19605 - Removed unused url imports from doc examples. 2013-01-15 07:50:26 -05:00
sites.txt Fixed #19779 -- Checked contrib.sites presence in RedirectFallbackMiddleware 2013-02-08 16:32:09 +01:00
staticfiles.txt Fixed #19715 -- Simplified findstatic output when verbosity set to 0 2013-02-01 11:55:05 +01:00
syndication.txt Test case and docs for custom context data in feeds 2013-02-24 08:33:20 -06:00
webdesign.txt Fixed many more ReST indentation errors, somehow accidentally missed from [16955] 2011-10-14 00:12:01 +00:00