summaryrefslogtreecommitdiff
path: root/django/forms/formsets.py
AgeCommit message (Collapse)Author
2015-03-27Fixed #24469 -- Refined escaping of Django's form elements in non-Django ↵Moritz Sichert
templates.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-13Fixed #23812 -- Changed django.utils.six.moves.xrange imports to rangeMichael Hall
2014-05-16Fixed #22628 -- Took initial forms into account when combining ↵Stephen Burrows
FormSet.min_num and FormSet.extra. Forwardport of 79f15ab1ef from stable/1.7.x
2014-04-07Removed casting to bool just before negation.Tomasz Wysocki
2014-03-30Corrected many style guide violations that the newest version of flake8 catchesAlex Gaynor
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2013-12-16Fixed #17413 -- Serialization of form errors along with all metadata.Loic Bistuer
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-25Fixed #21489 -- Make formsets directly importable from django.forms.Loic Bistuer
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-11-02Correct flake8 violation E261Ray Ashman Jr
2013-10-26Fixed all the E203 violationsAlex Gaynor
2013-10-23Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol
2013-10-18Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol
2013-09-19Fixed #9532 -- Added min_num and validate_min on formsets.yokomizor
Thanks gsf for the suggestion.
2013-09-16Fixed #17627 -- Renamed util.py files to utils.pyTim Graham
Thanks PaulM for the suggestion and Luke Granger-Brown and Wiktor Kołodziej for the initial patch.
2013-09-06Fixed a number of flake8 errors -- particularly around unused imports and ↵Alex Gaynor
local variables
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-06-22Fixed 17478 -- Allowed queryset overriding in BaseModelFormSet initClaude Paroz
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.
2013-06-19Removed several unused imports.Aymeric Augustin
2013-06-18Fixed #20199 -- Allow ModelForm fields to override error_messages from model ↵Loic Bistuer
fields
2013-06-16Fixed #20464 -- Added a `total_error_count` method on formsets.Baptiste Mispelon
Thanks to frog32 for the report and to Tim Graham for the review.
2013-05-20Fixed #20403 -- Ignore forms marked for deletion when validating max_num.Ryan Kaskel
2013-05-18Fixed #11160 - Ensure full_clean is called from non_form_errorsSenko Rasic
Updated FormSet.non_form_errors() to ensure full_clean() has been called before returning the errors.
2013-05-17Replaced an antiquated pattern.Aymeric Augustin
Thanks Lennart Regebro for pointing it out.
2013-05-04Used ngettext in a formsets error messageClaude Paroz
Several languages will distinctly translate '%d or fewer forms' depending on the variable.
2013-03-28Fixed spelling errorsGavin Wahl
2013-03-21Fixed #20084 -- Provided option to validate formset max_num on server.Andrew Gorcester
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-02-19Added a default limit to the maximum number of forms in a formset.Aymeric Augustin
This is a security fix. Disclosure and advisory coming shortly.
2013-02-08Fixed #18906 -- Ignored to-be-deleted forms in formset validate_uniqueClaude Paroz
Thanks c.pollock at bangor.ac.uk for the report.
2013-01-03Fixed #19545 -- Make sure media/is_multipart work with empty formsetsSimon Charette
2013-01-01Removed unusable parameters to empty_form propertyClaude Paroz
2012-12-06Fixed #18574 -- Make BaseFormSet.is_valid call its underlying forms' is_validAndreas Hug
Thanks Simon Charette for the report and the initial patch.
2012-11-03Fixed #18963 -- Used a subclass-friendly patternAymeric Augustin
for Python 2 object model compatibility methods.
2012-10-13Fixed #16479 - Forms generated from formsets use ErrorList instead of ↵Ludovic Delaveau
supplied error_class Patch with tests from charettes, updated.
2012-09-06Made use of property decorator in formsets.pyClaude Paroz
2012-08-30Fixed #18751 -- Cleaned up BaseFormSet._should_delete_formClaude Paroz
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.
2012-08-13[py3] Avoided comparison with None value in formsetsClaude Paroz
2012-08-12[py3] Refactored __unicode__ to __str__.Aymeric Augustin
* 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
2012-08-08[py3] Replaced __nonzero__ by __bool__Claude Paroz
Of course, __nonzero__ alias has been kept for Python 2 compatibility.
2012-08-03Replaced some byte strings by str() callsClaude Paroz
This is a useful trick when Python 2 awaits byte strings and Python 3 Unicode (regular) strings.
2012-07-22[py3] Added Python 3 compatibility for xrange.Aymeric Augustin
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-01-15Added support for specifying initial values to model formsets and inline ↵Ramiro Morales
formsets. This make them consistent with the similar capability of regular formsets. Thanks to simon29 form the report and to Claude Paroz for the patch. Fixes #14574. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18Remove comments referencing encryption. Django doesn't do encryption.Paul McMillan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17012 bcc190cf-cafb-0310-a4f2-bffc1f526a37