| Age | Commit message (Collapse) | Author |
|
Backport of ec85df2fa5 from master
|
|
Backport of 77c0a904cb from master
|
|
Thanks bmispelon, kezabelle, jorgecarleitao, and timgraham for reviews.
Backport of cd20b5d186 from master
|
|
formset.save(commit=False).
Thanks django at patjack.co.uk.
Backport of 2f7a7842ba from master
|
|
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 9fb0f5dddc4cf7f2d294af1bcde2c359cffd90a5 from master
|
|
Added ModelForm and NON_FIELD_ERRORS imports.
Backport of 64ee097b3b from master
|
|
Backport of 7271f5db78 from master
|
|
Errors detected by Topy (https://github.com/intgr/topy), all changes
verified by hand.
Backport of 11d453bcad from master
|
|
cb5dd99bb4 from master.
|
|
|
|
|
|
|
|
Thanks Tim Graham for the report and recommendations
|
|
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.
|
|
|
|
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.
|
|
|
|
I updated the documentation, that the modelform now includes the 'slug' field.
|
|
|
|
|
|
Thanks treysta at gmail.com for the suggestion.
|
|
Fixed #19617 -- Refactored form metaclasses to support more inheritance scenarios.
|
|
Thanks ebertti at yahoo.com.br for the suggestion.
|
|
shadowing them.
|
|
scenarios.
Thanks apollo13, funkybob and mjtamlyn for the reviews.
|
|
The ModelForm docs suggested that fields defined declaratively override
default fields generated from the form Meta.
This is conceptually wrong, especially with inheritance in mind. Meta is
usually defined on the topmost ModelForm subclass, while fields can come
from anywhere in the MRO, especially base classes; therefore we suggested
that something defined in a base class override something from a subclass.
This patch rephrases the docs around the idea that Meta is used to generate
*missing* fields.
Refs #8620, #19617.
Thanks @mjtamlyn and @timgraham for the review.
|
|
Thanks gsf for the suggestion.
|
|
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
|
|
|
|
Sphinx generates left single quotes for apostrophes after
code markup, when right single quotes are required. The
easiest way to fix this is just by inserting the unicode
character for a right single quote.
Instances of the problem were found by looking for
">‘" in the generated HTML.
|
|
Thanks laureline.guerin@ and Wedg.
|
|
|
|
|
|
|
|
Thanks gregcorey@ for the suggestion.
|
|
Thanks johnsmith for the suggestion.
|
|
Thanks Marc Tamlyn and Tim Graham for the review.
|
|
|
|
Thanks to frog32 for the report and to Tim Graham for the review.
|
|
error_messages
|
|
|
|
|
|
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.
|
|
Fixed typo: froms -> forms
|
|
Thanks sane4ka.sh@ for the report.
|
|
|
|
|
|
|
|
|
|
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.
|