Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/forms/formsets.py
Commit message (Collapse)AuthorAgeFilesLines
* Added release notes for feature added in fe21fb81Russell Keith-Magee2015-06-051-0/+3
|
* Fixed #18166 -- Added form_kwargs support to formsets.Sergei Maertens2015-06-041-2/+11
| | | | | | | | By specifying form_kwargs when instantiating the formset, or overriding the `get_form_kwargs` method on a formset class, you can pass extra keyword arguments to the underlying `Form` instances. Includes tests and documentation update.
* Fixed #24469 -- Refined escaping of Django's form ↵Moritz Sichert2015-03-281-0/+2
| | | | elements in non-Django templates.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-4/+3
|
* Fixed #23812 -- Changed django.utils.six.moves.xrange ↵Michael Hall2014-12-131-2/+2
| | | | imports to range
* Fixed #22628 -- Took initial forms into account when ↵Stephen Burrows2014-05-161-4/+4
| | | | | | combining FormSet.min_num and FormSet.extra. Forwardport of 79f15ab1ef from stable/1.7.x
* Removed casting to bool just before negation.Tomasz Wysocki2014-04-071-1/+1
|
* Corrected many style guide violations that the newest ↵Alex Gaynor2014-03-301-1/+1
| | | | version of flake8 catches
* Fixed many typos in comments and docstrings.Rodolfo Carvalho2014-03-031-1/+1
| | | | Thanks Piotr Kasprzyk for help with the patch.
* Fixed #17413 -- Serialization of form errors along with ↵Loic Bistuer2013-12-161-1/+1
| | | | all metadata.
* Fixed E125 pep8 warningsChristopher Medrela2013-11-281-3/+3
|
* Fixed #21489 -- Make formsets directly importable from ↵Loic Bistuer2013-11-261-1/+1
| | | | django.forms.
* Fixed all E226 violationsAlex Gaynor2013-11-031-1/+1
|
* More attacking E302 violatorsAlex Gaynor2013-11-021-0/+4
|
* Correct flake8 violation E261Ray Ashman Jr2013-11-021-2/+2
|
* Fixed all the E203 violationsAlex Gaynor2013-10-271-2/+2
|
* Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol2013-10-231-0/+1
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-1/+1
|
* Fixed #9532 -- Added min_num and validate_min on formsets.yokomizor2013-09-191-5/+22
| | | | Thanks gsf for the suggestion.
* Fixed #17627 -- Renamed util.py files to utils.pyTim Graham2013-09-161-1/+1
| | | | | Thanks PaulM for the suggestion and Luke Granger-Brown and Wiktor Kołodziej for the initial patch.
* Fixed a number of flake8 errors -- particularly around ↵Alex Gaynor2013-09-071-1/+2
| | | | unused imports and local variables
* Fixed #20989 -- Removed useless explicit list ↵Simon Charette2013-08-301-3/+3
| | | | comprehensions.
* Removed most of absolute_import importsClaude Paroz2013-07-291-1/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Fixed 17478 -- Allowed queryset overriding in ↵Claude Paroz2013-06-221-7/+8
| | | | | | | | | | BaseModelFormSet init BaseModelFormSet.forms is now a cached property instead of being populated in the __init__ method. This behaviour also matches an example in the documentation. Thanks Thomasz Swiderski for the report and Simon Charette for the review.
* Removed several unused imports.Aymeric Augustin2013-06-191-1/+1
|
* Fixed #20199 -- Allow ModelForm fields to override ↵Loic Bistuer2013-06-181-2/+7
| | | | error_messages from model fields
* Fixed #20464 -- Added a `total_error_count` method on ↵Baptiste Mispelon2013-06-161-0/+7
| | | | | | formsets. Thanks to frog32 for the report and to Tim Graham for the review.
* Fixed #20403 -- Ignore forms marked for deletion when ↵Ryan Kaskel2013-05-201-1/+2
| | | | validating max_num.
* Fixed #11160 - Ensure full_clean is called from ↵Senko Rasic2013-05-181-4/+7
| | | | | | | non_form_errors Updated FormSet.non_form_errors() to ensure full_clean() has been called before returning the errors.
* Replaced an antiquated pattern.Aymeric Augustin2013-05-171-1/+1
| | | | Thanks Lennart Regebro for pointing it out.
* Used ngettext in a formsets error messageClaude Paroz2013-05-041-2/+4
| | | | | Several languages will distinctly translate '%d or fewer forms' depending on the variable.
* Fixed spelling errorsGavin Wahl2013-03-281-1/+1
|
* Fixed #20084 -- Provided option to validate formset ↵Andrew Gorcester2013-03-211-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added a default limit to the maximum number of forms in ↵Aymeric Augustin2013-02-191-8/+15
| | | | | | a formset. This is a security fix. Disclosure and advisory coming shortly.
* Fixed #18906 -- Ignored to-be-deleted forms in formset ↵Claude Paroz2013-02-081-3/+2
| | | | | | validate_unique Thanks c.pollock at bangor.ac.uk for the report.
* Fixed #19545 -- Make sure media/is_multipart work with ↵Simon Charette2013-01-031-2/+5
| | | | empty formsets
* Removed unusable parameters to empty_form propertyClaude Paroz2013-01-011-8/+6
|
* Fixed #18574 -- Make BaseFormSet.is_valid call its ↵Andreas Hug2012-12-061-3/+2
| | | | | | underlying forms' is_valid Thanks Simon Charette for the report and the initial patch.
* Fixed #18963 -- Used a subclass-friendly patternAymeric Augustin2012-11-031-1/+3
| | | | for Python 2 object model compatibility methods.
* Fixed #16479 - Forms generated from formsets use ↵Ludovic Delaveau2012-10-131-1/+5
| | | | | | ErrorList instead of supplied error_class Patch with tests from charettes, updated.
* Made use of property decorator in formsets.pyClaude Paroz2012-09-061-18/+18
|
* Fixed #18751 -- Cleaned up BaseFormSet._should_delete_formClaude Paroz2012-08-301-7/+4
| | | | | | We can do that now that cleaned_data is guaranteed to be present. Related to [121fd109]. Thanks Simon Charette for his work on the ticket.
* [py3] Avoided comparison with None value in formsetsClaude Paroz2012-08-131-5/+6
|
* [py3] Refactored __unicode__ to __str__.Aymeric Augustin2012-08-121-3/+4
| | | | | | | | | * Renamed the __unicode__ methods * Applied the python_2_unicode_compatible decorator * Removed the StrAndUnicode mix-in that is superseded by python_2_unicode_compatible * Kept the __unicode__ methods in classes that specifically test it under Python 2
* [py3] Replaced __nonzero__ by __bool__Claude Paroz2012-08-081-1/+2
| | | | Of course, __nonzero__ alias has been kept for Python 2 compatibility.
* Replaced some byte strings by str() callsClaude Paroz2012-08-031-1/+1
| | | | | This is a useful trick when Python 2 awaits byte strings and Python 3 Unicode (regular) strings.
* [py3] Added Python 3 compatibility for xrange.Aymeric Augustin2012-07-221-0/+1
|
* [py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin2012-07-221-3/+4
|
* Fixed #18269 -- Applied unicode_literals for Python 3 ↵Claude Paroz2012-06-071-11/+11
| | | | | | | compatibility. Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).