summaryrefslogtreecommitdiff
path: root/docs/ref/forms
AgeCommit message (Collapse)Author
2014-02-04Made some PEP8 fixes in docs/ref/forms/widgets.txtTim Graham
Thanks Siecje.
2014-01-22Always use parentheses when documenting a method with no arguments.Baptiste Mispelon
2014-01-22Don't show `self` in the list of arguments of a method.Baptiste Mispelon
This is consistent with Python's official documentation and it's a sphinx recommendation too[1]. [1] http://sphinx-doc.org/markup/desc.html#dir-method Refs #21855.
2014-01-11Fixed #8898 -- Obsoleted SplitDateTimeWidget usage with DateTimeFieldClaude Paroz
Thanks Tim Graham for the review.
2014-01-02Fixed #21319 -- Added documentation for the Form.fields attribute.Vajrasky Kok
Thanks pydanny for the report. Also, added documentation about base_fields attribute and its difference with fields attribute.
2013-12-25Fixed #21669 -- Typo in docs/ref/forms/fields.txt.Tim Graham
Thanks alex_koval for the report.
2013-12-16Fixed #17413 -- Serialization of form errors along with all metadata.Loic Bistuer
2013-11-30Removed Form._errors from the docs in favor of the add_error API.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-18Fixed #21397 -- Re-added flexibility to TypedChoiceField coercionClaude Paroz
Thanks Elec for the report and Simon Charette for the review.
2013-11-12Fixed typos in previous commit (9aa6d4bdb6618ba4f17acc7b7c0d1462d6cbc718).Baptiste Mispelon
2013-11-12Removed a mention of `Form._errors` from the documentation.Baptiste Mispelon
Also removed a sentence that was incorrect: raising a `ValidationError` inside `Form.clean` doesn't clear the `cleaned_data` attribute. Thanks to loic84 and timograham for the review.
2013-10-14Fixed #8620 -- Updated the Form metaclass to support excluding fields by ↵Loic Bistuer
shadowing them.
2013-10-12Forms docs: More emphasis in 'id' value customizability.Ramiro Morales
2013-09-28Fixed #20439 -- Started deprecation of IPAddressFieldErik Romijn
2013-09-23Fixed #21120 -- Added more explicit text on using validators and link to ↵Ben Huckvale
writing validators. Thanks nicolas at niconomicon.net for the suggestion.
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-05Fixed #21009 -- Added a versionchanged note regarding changes to clean().Tim Graham
refs [fb1dd6b13a] and [1c4a9bd9ad1]
2013-08-28Fixed #20986 -- Enabled SelectDateWidget to use custom monthsLoic Bistuer
Reviewed by Trac alias MarkusH.
2013-08-19Removed versionadded/changed annotations for 1.5Tim Graham
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-08Added an anchor for django.forms.Form.clean in docsTim Graham
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-07-29Fixed #20823 -- Typo in docs/ref/forms/validation.txtTim Graham
2013-07-29Misc doc cleanups.minusf
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-07-08Fixed #19695 -- Retitle "Form Media" to "Form Assets".James Bennett
2013-07-08Fixed #12346 -- Added a note on how to validate InlineFormSets.Tim Graham
Thanks johnsmith for the suggestion.
2013-07-05Fixed #20224 -- Update docs examples which mention __unicode__Claude Paroz
Thanks Marc Tamlyn and Tim Graham for the review.
2013-07-02A couple more semicolon -> colon fixes; refs #18134.Tim Graham
2013-06-18Fixed #20199 -- Allow ModelForm fields to override error_messages from model ↵Loic Bistuer
fields
2013-06-13Fixed #20000 -- Allowed ModelForm meta overrides for label, help_text and ↵Loic Bistuer
error_messages
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-09Fixed #20567 - Documented BoundField.id_for_label.Tim Graham
Thanks littlepig for the suggestion.
2013-06-05Proofed the 1.6 release notesTim Graham
2013-05-19add missing imports to the examples in the 'Forms'leandrafinger
2013-05-18Fixed #13546 -- Easier handling of localize field options in ModelFormErik Romijn
2013-05-17Fixed #5472 --Added OpenLayers-based widgets in contrib.gisClaude Paroz
Largely inspired from django-floppyforms. Designed to not depend on OpenLayers at code level.
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-04-20Adapted uses of versionchanged/versionadded to the new form.Juan Catalano
Refs #20104.
2013-04-18Complemented documentation following commit be9ae693cClaude Paroz
Refs #17840. Thanks Carl Meyer for noticing the omission.
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-12Documented BoundField.label_tagClaude Paroz
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.