summaryrefslogtreecommitdiff
path: root/django/forms
AgeCommit message (Collapse)Author
2013-08-08Form.clean() does not need to return cleaned_data.Marc Tamlyn
If it does, that will be used as the cleaned_data. The default implementation has been changed to match this change.
2013-08-06Fixed #15511 -- Allow optional fields on ``MultiValueField` subclasses.Tai Lee
The `MultiValueField` class gets a new ``require_all_fields`` argument that defaults to ``True``. If set to ``False``, individual fields can be made optional, and a new ``incomplete`` validation error will be raised if any required fields have empty values. The ``incomplete`` error message can be defined on a `MultiValueField` subclass or on each individual field. Skip duplicate errors.
2013-08-05Fixed #20850 -- Added MultiWidget.needs_multipart_formTim Heap
2013-08-04Deprecated SortedDict (replaced with collections.OrderedDict)Curtis Maloney
Thanks Loic Bistuer for the review.
2013-08-02Fixed #18777 -- Localized form fields with as_text/as_hiddenAleksandra Sendecka
Thanks croldan for the report.
2013-07-31Fixed #20649 -- Allowed blank field display to be defined in the initial ↵Alex Couper
list of choices.
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-07-26Fixed #20805 -- Removed an extra colon beside checkboxes in the admin.Tim Graham
Thanks CollinAnderson for the report.
2013-07-23Fixed #10284 -- ModelFormSet.save(commit=False) no longer deletes objectsTim Graham
Thanks laureline.guerin@ and Wedg.
2013-07-22Fixed #20781 -- Fixed _has_changed regression with MultiValueFieldClaude Paroz
Thanks Tim Graham for the report.
2013-07-19Fixed #20765 -- Set small values of `step` using exponential notation.Simon Charette
Browsers parse small factors of 10 as 0 under decimal notation. Thanks to Trac alias matklad for the report and Claude Paroz for the review.
2013-07-13Fixed #20582 -- Allowed default Form.label_suffix to be translatedClaude Paroz
Thanks Tim Graham for the review.
2013-07-05Deprecate usage of boolean value for widget attributesClaude Paroz
Django 1.7 will loudly warn when widget attributes are assigned boolean values. In Django 1.8, False will mean attribute is not present while True will mean attribute present without value. Refs #20684.
2013-06-29Advanced deprecation warnings for Django 1.7.Aymeric Augustin
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-20Fixed #20630 -- Removed `maxlength` attribute from `NumberInput`.Simon Charette
This attribute is only allowed on inputs of type "text", "search", "url", "tel", "email", or "password". Thanks to yoyoma for the report and @bmispelon for the review.
2013-06-19Removed several unused imports.Aymeric Augustin
2013-06-18Fixed #20618 -- Fixed regression in `BoundField.label_tag`.Baptiste Mispelon
2013-06-18Fixed #20199 -- Allow ModelForm fields to override error_messages from model ↵Loic Bistuer
fields
2013-06-18Refactored ValidationError to allow persisting error params and error codes ↵Loic Bistuer
as the exception bubbles up
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-06-13Fixed #20000 -- Allowed ModelForm meta overrides for label, help_text and ↵Loic Bistuer
error_messages
2013-06-13Fixed #20594 -- Add validation to models.SlugField.Baptiste Mispelon
Thanks carbonXT for the report.
2013-06-10Fixed #18134 -- BoundField.label_tag now includes the form's label_suffixGabe Jackson
There was an inconsistency between how the label_tag for forms were generated depending on which method was used: as_p, as_ul and as_table contained code to append the label_suffix where as label_tag called on a form field directly did NOT append the label_suffix. The code for appending the label_suffix has been moved in to the label_tag code of the field and the HTML generation code for as_p, as_ul and as_table now calls this code as well. This is a backwards incompatible change because users who have added the label_suffix manually in their templates may now get double label_suffix characters in their forms.
2013-06-06Fixed #12337 - Honor ModelForm.Meta.exclude when saving ManyToManyFields.Stephen Burrows
Thanks margieroginski for the report.
2013-05-30Added missing stacklevel arg in forms/models.pyClaude Paroz
2013-05-26Replaced `and...or...` constructs with PEP 308 conditional expressions.Ramiro Morales
2013-05-25Fixed #11725 -- Made possible to create widget label tag without "for"Claude Paroz
Thanks Denis Martinez for the report and initial patch, and Sergey Kolosov for bringing the patch up to date.
2013-05-23Made fix for #9321 less buggy and more effective.Ramiro Morales
Don't try to be smart about building a good-looking help string because it evaluates translations too early, simply use the same old strategy as before. Thanks Donald Stufft for the report. Also, actually fix the case reported by the OP by special-casing CheckboxSelectMultiple. Added tests. Refs #9321.
2013-05-22Fixed #18709 -- Check if initial_value is a callableJeroen Dekkers
In _get_changed_data, check if initial_value is a callable and call it if it is.
2013-05-20Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField ↵Ramiro Morales
fields. This is backward incompatible for custom form field/widgets that rely on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select more than one.' sentence. Application that use standard model form fields and widgets aren't affected but need to start handling these help texts by themselves before Django 1.8. For more details, see the related release notes and deprecation timeline sections added with this commit.
2013-05-20Fixed #20403 -- Ignore forms marked for deletion when validating max_num.Ryan Kaskel
2013-05-19Merge pull request #1094 from senko/ticket_11160Andrew Godwin
Fixed #11160: Formset non_form_errors returns ErrorList() if is_valid is not called
2013-05-18Fixed #20440 -- Ensured CharField's max_length/min_length are integersTome Cvitan
2013-05-18Merge pull request #1113 from denibertovic/masterAymeric Augustin
Fixed #18761 -- Added whitespace stripping to URLField and SlugField.
2013-05-18Added stripping of whitespace for SlugField and URLFieldDeni Bertovic
2013-05-18Fixed argument order for localized_fields to ensure backwards compatibilityErik Romijn
2013-05-18Fixed #13546 -- Easier handling of localize field options in ModelFormErik Romijn
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-14Fixed #19934 - Use of Pillow is now preferred over PIL.Daniel Lindsley
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-09Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and ↵Luke Plant
added '__all__' shortcut This also updates all dependent functionality, including modelform_factory and modelformset_factory, and the generic views `ModelFormMixin`, `CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-05-04Used ngettext in a formsets error messageClaude Paroz
Several languages will distinctly translate '%d or fewer forms' depending on the variable.
2013-04-13Fixed #17840 -- Generalized named placeholders in form error messagesClaude Paroz
Also fixed plural messages for DecimalField.
2013-04-13Fixed #4592: Made CheckboxSelectMultiple more like RadioSelectBaptiste Mispelon
I refactored RadioSelect and CheckboxSelectMultiple to make them inherit from a base class, allowing them to share the behavior of being able to iterate over their subwidgets. Thanks to Matt McClanahan for the initial patch and to Claude Paroz for the review.
2013-04-13Fixed #4117: Apply id attribute to the outer <ul> of RadioSelectBaptiste Mispelon
2013-04-13Fixed #19874: Apply id attribute to the outer <ul> of CheckboxSelectMultipleBaptiste Mispelon
2013-04-12Fixed #20211: Document backwards-incompatible change in BoundField.label_tagBaptiste Mispelon
Also cleaned up label escaping and consolidated the test suite regarding label_tag.
2013-04-07Fix #15126: Better error message when passing invalid options to ModelForm.Meta.Baptiste Mispelon
2013-03-28Fixed spelling errorsGavin Wahl