0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00
django/docs
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
..
_ext Fixed creation of html docs on python 3. 2013-02-24 15:45:53 +01:00
_theme/djangodocs Fixed #18789 - Fixed some text wrap issues with methods in the docs. 2013-02-19 10:25:26 -05:00
faq Fixed #15363 -- Renamed and normalized to get_queryset the methods that return a QuerySet. 2013-03-08 10:11:45 -05:00
howto Fixed #19968 -- Dropped support for PostgreSQL < 8.4. 2013-03-18 21:16:29 +01:00
internals Deprecated django.views.defaults.shortcut. 2013-03-14 20:30:23 +01:00
intro Fixed #19965 - Added a warning that the tutorial is written for Python 2. 2013-03-12 08:04:32 -04:00
man Revert "Patch by Claude for #16084." 2013-01-25 13:58:37 -03:00
misc Fixed #19728 - Updated API stability doc to reflect current meaning of "stable". 2013-02-19 18:19:50 -05:00
ref Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
releases Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
topics Fixed #20084 -- Provided option to validate formset max_num on server. 2013-03-21 01:27:24 -07:00
conf.py Fixed #19699 - Removed "Please see the release notes" from versionadded/changed directives 2013-02-09 09:16:10 -05:00
contents.txt Removed an obsolete documentation page about admin style customization. 2012-09-10 17:19:35 -07:00
glossary.txt Fixed #18451 -- Vastly improved class based view documentation. 2012-06-11 10:40:23 +02:00
index.txt Deprecated django.contrib.comments. 2013-03-11 15:38:40 -05:00
make.bat Fixed #19516 - Fixed remaining broken links. 2013-01-02 18:32:57 -05:00
Makefile Fixed #19516 - Fixed remaining broken links. 2013-01-02 18:32:57 -05:00
README Fixed #18928. Tightened language in docs/README. 2012-09-08 11:11:37 +05:30

The documentation in this tree is in plain text files and can be viewed using
any text file viewer.

It uses ReST (reStructuredText) [1], and the Sphinx documentation system [2].  
This allows it to be built into other forms for easier viewing and browsing.

To create an HTML version of the docs:

* Install Sphinx (using ``sudo pip install Sphinx`` or some other method)

* In this docs/ directory, type ``make html`` (or ``make.bat html`` on
  Windows) at a shell prompt.

The documentation in _build/html/index.html can then be viewed in a web browser.

[1] http://docutils.sourceforge.net/rst.html
[2] http://sphinx.pocoo.org/