summaryrefslogtreecommitdiff
path: root/django/forms/forms.py
AgeCommit message (Collapse)Author
2016-02-24[1.8.x] Fixed #26267 -- Fixed BoundField to reallow slices of subwidgets.Jon Dufresne
Backport of b41268135995cef46d40e550f9301fab20cf330d from master
2015-06-04[1.8.x] Removed comment from Form.changed_data; refs #24191Alasdair Nicol
Backport of 5987b3c46d5a6948737627d294d95ed54d49eae6 from master
2015-03-27[1.8.x] Fixed #24469 -- Refined escaping of Django's form elements in ↵Moritz Sichert
non-Django templates. Backport of 1f2abf784a9fe550959de242d91963b2ad6f7e9c from master
2015-03-18[1.8.x] Refs #24469 -- Fixed escaping of forms, fields, and media in ↵Moritz Sichert
non-Django templates. Backport of 6bff3439894ac22d80f270f36513fc86586273f3 from master
2015-02-24[1.8.x] Fixed #24391 -- Made BoundField.value() cache callable values.Michael Angeletti
Backport of 65441bbdb02427655869c42791a0bc5a9c631292 from master
2015-02-09[1.8.x] Sorted imports with isort; refs #23860.Tim Graham
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
2015-01-15Fixed #23712 -- Fixed KeyError with BaseForm._html_output()Yang Liu
2014-12-03Removed redundant numbered parameters from str.format().Berker Peksag
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-08-22Fixed #23167 -- Added BaseForm.__repr__()areski
Thanks Keryn Knight for the idea.
2014-08-15Fixed #23162 -- Renamed forms.Field._has_changed() to has_changed().Gabriel Muñumel
2014-08-04Fixed #22745 -- Prevented reevaluation of ModelChoiceField's queryset when ↵Vincent-Vega
accesssing BoundField's attrs. Thanks Christian Schmitt for review.
2014-08-04Corrected a comment in forms/forms.py; refs #16612.Tim Graham
2014-08-02Fixed two typos in docstrings.Baptiste Mispelon
2014-07-05Ensured bound field renders as unicode safe dataClaude Paroz
Refs #22950.
2014-06-02Fixed #11776 -- Added CSS class for non-field/top of form errors.Nick Presta
Thanks Daniel Pope for the suggestion.
2014-05-24Fixed #22510 -- Harden field removal to only None.Marc Tamlyn
Refs #8620. If we allow any value to remove form fields then we get name clashes with method names, media classes etc. There was a backwards incompatibility introduced meaning ModelForm subclasses with declared fields called media or clean would lose those fields. Field removal is now only permitted by using the sentinel value None. The docs have been slightly reworded to refer to removal of fields rather than shadowing. Thanks to gcbirzan for the report and initial patch, and several of the core team for opinions.
2014-05-13Fixed #22533 -- Added label_suffix parameter to form fields.Julen Ruiz Aizpuru
Fields can now receive the `label_suffix` attribute, which will override a form's `label_suffix`. This enhances the possibility to customize form's `label_suffix`, allowing to use such customizations while using shortcuts such as `{{ form.as_p }}`. Note that the field's own customization can be overridden at runtime by using the `label_prefix` parameter to `BoundField.label_tag()`. Refs #18134.
2014-05-10Fixed #22502 -- Fixed microseconds/default/form interactionStephen Burrows
Made explicit lack of microsecond handling by built-in datetime form fields. Used that explicitness to appropriately nix microsecond values in bound fields. Thanks Claude Paroz for the review.
2014-05-05Fixed #22570 -- Made Form.__getitem__ KeyError more descriptive.Ben Davis
2014-04-07Removed casting to bool just before negation.Tomasz Wysocki
2014-03-24Fixed #17922 -- Added required_css_class to form label.Anubhav Joshi
Thanks hanson2010 for the suggestion.
2014-03-24Fixed #22318 -- Added Form.has_error() to easily check if a given error has ↵Loic Bistuer
happened.
2014-03-21Removed backwards compatibility code to call field.widget._has_changed()Tim Graham
This logic should be moved to field._has_changed() as described in ebb504db692cac496f4f45762d1d14644c9fa6f - refs #16612.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-02-08Fixed #16192 -- Made unique error messages in ModelForm customizable.Loic Bistuer
Overriding the error messages now works for both unique fields, unique_together and unique_for_date. This patch changed the overriding logic to allow customizing NON_FIELD_ERRORS since previously only fields' errors were customizable. Refs #20199. Thanks leahculver for the suggestion.
2014-01-10Fixed docstring typo in django/forms/forms.py.Marc Sibson
2013-12-16Fixed #17413 -- Serialization of form errors along with all metadata.Loic Bistuer
2013-11-30Fixed #20867 -- Added the Form.add_error() method.Loic Bistuer
Refs #20199 #16986. Thanks @akaariai, @bmispelon, @mjtamlyn, @timgraham for the reviews.
2013-11-03Fixed flake8 E251 violationsMilton Mazzarri
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-11-02Correct flake8 violation E261Ray Ashman Jr
2013-10-26Fixed up some more flake8 violations (this particular violation still has ↵Alex Gaynor
many occurrences in the tests/ dir so it can't be removed from setup.cfg yet)
2013-10-14Fixed #8620 -- Updated the Form metaclass to support excluding fields by ↵Loic Bistuer
shadowing them.
2013-10-14Fixed #19617 -- Refactored Form metaclasses to support more inheritance ↵Loic Bistuer
scenarios. Thanks apollo13, funkybob and mjtamlyn for the reviews.
2013-09-21Ensured that BoundField.as_widget always returns properly localized fields.Florian Apolloner
This is a follow-up to #18777 which improperly converted to strings in prepare_value and as such caused regressions like #21074. Refs #18777, #21074
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-10Fixed #5749 -- Added field_name as a key in the _html_output dicte0ne
Thanks SmileyChris for the suggestion.
2013-08-22Moved translator comment just above the target stringClaude Paroz
2013-08-13Fixed #20555 -- Make subwidget id attribute availableMatt Johnson
In `BoundField.__iter__`, the widget's id attribute is now passed to each subwidget. A new id_for_label property was added to ChoiceInput.
2013-08-08Revert change to the default Form.clean()Marc Tamlyn
This means it doesn't break for people who are doing `cleaned_data = super(FooForm, self).clean()`.
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-04Deprecated SortedDict (replaced with collections.OrderedDict)Curtis Maloney
Thanks Loic Bistuer for the review.
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-13Fixed #20582 -- Allowed default Form.label_suffix to be translatedClaude Paroz
Thanks Tim Graham for the review.
2013-06-29Advanced deprecation warnings for Django 1.7.Aymeric Augustin
2013-06-18Fixed #20618 -- Fixed regression in `BoundField.label_tag`.Baptiste Mispelon
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.