0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
django/docs/topics
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
..
auth Fixed #19394 --Added note about auth forms and custom user models. 2013-02-24 07:55:38 -08:00
class-based-views Fixed an erroneous import in example code. 2013-03-13 14:16:27 -03:00
db Fixed #19968 -- Dropped support for PostgreSQL < 8.4. 2013-03-18 21:16:29 +01:00
forms Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
http Deprecated django.views.defaults.shortcut. 2013-03-14 20:30:23 +01:00
i18n Fixed #19922 - Typo in translation docs. 2013-02-26 15:12:28 -05:00
testing Fixed #20032 -- Documented how to simulate the absence of a setting 2013-03-13 23:14:26 +01:00
cache.txt Fixed #19253 -- Extracted template cache key building logic 2013-02-24 14:32:45 +01:00
conditional-view-processing.txt Fixed #6195 -- Documented caching options for javascript_catalog. 2013-02-25 22:29:38 +01:00
email.txt Fixed #18934 - Removed versionadded/changed annotations for Django 1.3 2012-09-20 19:06:55 -04:00
files.txt Fixed typo. 2013-01-23 12:36:48 -08:00
index.txt Removed django.contrib.localflavor. 2012-12-29 21:59:06 +01:00
install.txt Update link to django-mssql project 2013-03-06 12:12:42 -05:00
localflavor.txt Fixed #20096 -- Added link to the Greek localflavor app 2013-03-20 17:08:08 +01:00
logging.txt Fixed #19516 - Fixed remaining broken links. 2013-01-02 18:32:57 -05:00
pagination.txt Removed versionadded/changed annotations dating back to 1.4. 2012-12-29 21:59:08 +01:00
python3.txt Minor docs fix for e11ccc76. 2013-03-17 22:43:49 +01:00
security.txt Added a new required ALLOWED_HOSTS setting for HTTP host header validation. 2013-02-19 11:23:29 -07:00
serialization.txt Merge pull request #717 from slurms/ticket_19746 2013-02-24 06:31:14 -08:00
settings.txt Fixed #19516 - Fixed remaining broken links. 2013-01-02 18:32:57 -05:00
signals.txt Fixed #19579 - Documented that "providing_args" is purely documentational. 2013-02-23 15:33:43 -05:00
signing.txt Fixed #19683 - Added a missing import in signing example. 2013-01-29 06:12:33 -05:00
templates.txt Fixed #19552 -- Enhanced makemessages handling of `{# #}`-style template comments. 2013-01-29 19:13:23 -03:00