Commit Graph

196 Commits

Author SHA1 Message Date
Alasdair Nicol 2e2607870d [1.7.x] Added missing backticks to form validation docs
Backport of 38ab0f13fa from master
2014-11-20 11:09:57 -05:00
Loic Bistuer 0e03d4618b [1.7.x] Removed confusing paragraph from the docs.
This snippet wasn't particularly helpful as `add_error()` is described
in greater details in the following section.

Thanks Claude Paroz for the report.

Backport of f1f0c4f16b from master
2014-11-05 16:06:20 +07:00
Berker Peksag c3b101fae5 [1.7.x] Fixed versionchanged indentation in docs/.
Backport of 5c517ec218 from master
2014-11-03 21:43:21 -05:00
Duane Hilton f0e7a695f5 [1.7.x] Fixed #17638 -- Added crosslinks between topic and reference guides.
Thanks oinopion for the suggestion and jarus for the initial patch.

Backport of 054bdfeff1 from master
2014-09-29 18:17:13 -04:00
Simon Charette e42a82edf2 [1.7.x] Fixed #23391 -- Removed an erroneous backtip from the form's documentation.
Thanks to Trac alias nessita for the report.

Backport of ab9c886459 from master
2014-08-31 20:11:57 -04:00
Claude Paroz 022fdb2ac4 [1.7.x] Fixed #22786 -- Documented value_from_datadict caveat
Thanks blueyed for the report and Tim Graham for the review.
Backport of 909015a51b from master.
2014-08-29 10:25:32 +02:00
Tim Graham e86030b3be [1.7.x] Fixed #23354 -- Documented that ModelChoiceField to_field_name should be a unique field.
Thanks Keryn Knight for the suggestion.

Backport of 83762da3fb from master
2014-08-27 07:45:34 -04:00
Tim Graham 1b89f976f4 [1.7.x] Fixed #23250 -- Documented that ModelMultipleChoiceField queryset may be None.
Backport of ced3e303ca from master
2014-08-26 14:50:37 -04:00
Tim Graham 5f54752b9d [1.7.x] Fixed some doc errors that caused syntax highlighting to fail.
Backport of 27fdac97ae from master
2014-08-18 20:40:41 -04:00
Zhaorong Ma 2b694919db [1.7.x] Fixed a grammar error in docs/ref/forms/api.txt.
Backport of bef5b9b7cd from master
2014-08-14 12:15:14 -04:00
Tim Graham 5e42e9f059 [1.7.x] Fixed #21792 -- Documented Form.has_changed()
Thanks bjb at credil.org for the suggestion and
Ivan Mesic for the draft patch.

Backport of edcc75e5ac from master
2014-08-05 08:49:34 -04:00
areski a582431b41 [1.7.x] Fixed #23169 - Misc docs fixes.
Backport of e4dd8b5dde from master
2014-08-04 08:31:18 -04:00
Tim Graham af9949f4ef [1.7.x] Fixed #21942 -- Moved Form.clean() to form API docs.
Thanks cjerdonek for the suggestion.

Backport of 874053edf9 from master
2014-06-30 16:32:03 -04:00
Daniele Procida 60375eda32 [1.7.x] Fixed #22796 -- Added a more basic explanations of forms.
Thanks bmispelon, kezabelle, jorgecarleitao, and timgraham for reviews.

Backport of cd20b5d186 from master
2014-06-24 14:58:53 -04:00
Claude Paroz 1c0e6e9d9f [1.7.x] Fixed #22813 -- Updated Pillow URL in documentation
Backport of dfa3505ff1 from master.
2014-06-12 08:56:29 +02:00
Maxime Lorant c6725d69a2 [1.7.x] Fixed typo in docs/ref/forms/validation.txt.
Backport of c307383ec9 from master
2014-06-11 17:18:03 -04:00
Marc Tamlyn be733bf672 [1.7.x] Fixed #22510 -- Harden field removal to only None.
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.

Backport of 9fb0f5dddc from master
2014-05-24 13:11:50 +01:00
Claude Paroz 8c5fbcf50a [1.7.x] Fixed case in form widgets docs
Backport of 9494f29d from master
2014-05-16 17:44:20 -04:00
Anders Steinlein 2914f66983 [1.7.x] Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.
Thanks Stephen Burrows for work on the patch as well.
2014-05-15 07:02:06 -04:00
Tim Graham 38679254bf [1.7.x] Fixed #22216 -- Added Form.non_field_errors to form API doc.
Backport of d2f4553d70 from master
2014-04-05 18:17:13 -04:00
Anubhav Joshi ad43fdaa00 Fixed #21860 -- Added to_field_name to ModelChoiceField docs.
Thanks Keryn Knight for the suggestion.
2014-03-16 15:40:52 -04:00
Tim Graham 7f2505ad9e Fixed doc typos. 2014-02-28 11:44:03 -05:00
vvojvoda c23b3717be Fixed #21962 -- Added escape_html flag to ErrorDict.as_json() 2014-02-28 07:05:55 -05:00
Loic Bistuer 2e4200b5c7 Fixed #21654 -- Documented a use-case for Form.errors.as_data().
Thanks selwin for the suggestion.
2014-02-14 06:52:50 -05:00
Alasdair Nicol 8aa1efff6d Fixed #21951 -- Updated docs to use __str__ for Python 3
Thanks Tim Graham for the report and recommendations
2014-02-13 07:12:40 -05:00
Tim Graham 867f8fd6c7 Made some PEP8 fixes in docs/ref/forms/widgets.txt
Thanks Siecje.
2014-02-04 06:24:13 -05:00
Baptiste Mispelon 05d36dc06e Always use parentheses when documenting a method with no arguments. 2014-01-22 22:26:10 +01:00
Baptiste Mispelon 79e1d6ebd7 Don't show `self` in the list of arguments of a method.
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-22 22:17:32 +01:00
Claude Paroz 0179852d7f Fixed #8898 -- Obsoleted SplitDateTimeWidget usage with DateTimeField
Thanks Tim Graham for the review.
2014-01-11 15:50:34 +01:00
Vajrasky Kok ea83102d0f Fixed #21319 -- Added documentation for the Form.fields attribute.
Thanks pydanny for the report. Also, added documentation about
base_fields attribute and its difference with fields attribute.
2014-01-02 19:43:26 -05:00
Tim Graham 5d82658657 Fixed #21669 -- Typo in docs/ref/forms/fields.txt.
Thanks alex_koval for the report.
2013-12-25 06:02:43 -05:00
Loic Bistuer 3ce9829b61 Fixed #17413 -- Serialization of form errors along with all metadata. 2013-12-16 16:33:28 -05:00
Loic Bistuer b72b85af15 Removed Form._errors from the docs in favor of the add_error API. 2013-11-30 01:00:53 +07:00
Loic Bistuer f563c339ca Fixed #20867 -- Added the Form.add_error() method.
Refs #20199 #16986.

Thanks @akaariai, @bmispelon, @mjtamlyn, @timgraham for the reviews.
2013-11-30 01:00:53 +07:00
Claude Paroz a0f3eeccf3 Fixed #21397 -- Re-added flexibility to TypedChoiceField coercion
Thanks Elec for the report and Simon Charette for the review.
2013-11-18 18:24:56 +01:00
Baptiste Mispelon 0048ed77c7 Fixed typos in previous commit (9aa6d4bdb6). 2013-11-12 20:42:44 +01:00
Baptiste Mispelon 9aa6d4bdb6 Removed a mention of `Form._errors` from the documentation.
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-11-12 20:27:21 +01:00
Loic Bistuer b16dd1fe01 Fixed #8620 -- Updated the Form metaclass to support excluding fields by shadowing them. 2013-10-14 22:42:33 +07:00
Ramiro Morales 18ea1c473b Forms docs: More emphasis in 'id' value customizability. 2013-10-12 13:29:11 -03:00
Erik Romijn 1a63092981 Fixed #20439 -- Started deprecation of IPAddressField 2013-09-28 10:55:32 +02:00
Ben Huckvale 98e0453f00 Fixed #21120 -- Added more explicit text on using validators and link to writing validators.
Thanks nicolas at niconomicon.net for the suggestion.
2013-09-23 10:37:41 -04:00
yokomizor df27803a55 Fixed #9532 -- Added min_num and validate_min on formsets.
Thanks gsf for the suggestion.
2013-09-19 13:11:49 -04:00
Tim Graham 18ffdb1772 Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
2013-09-16 12:52:05 -04:00
Tim Graham ebfe42d018 Fixed #21009 -- Added a versionchanged note regarding changes to clean().
refs [fb1dd6b13a] and [1c4a9bd9ad]
2013-09-05 05:47:45 -04:00
Loic Bistuer da800be6dd Fixed #20986 -- Enabled SelectDateWidget to use custom months
Reviewed by Trac alias MarkusH.
2013-08-28 16:39:26 +03:00
Tim Graham 7b69c3e775 Removed versionadded/changed annotations for 1.5 2013-08-19 09:09:41 -04:00
Matt Johnson 907ef9d0d1 Fixed #20555 -- Make subwidget id attribute available
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-13 13:23:05 -04:00
Tim Graham 8442268869 Added an anchor for django.forms.Form.clean in docs 2013-08-08 14:13:52 -04:00
Marc Tamlyn fb1dd6b13a Form.clean() does not need to return cleaned_data.
If it does, that will be used as the cleaned_data. The default
implementation has been changed to match this change.
2013-08-08 14:05:55 +01:00
Tai Lee 1280675834 Fixed #15511 -- Allow optional fields on ``MultiValueField` subclasses.
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-06 08:50:47 -04:00