summaryrefslogtreecommitdiff
path: root/django/forms
AgeCommit message (Collapse)Author
2018-08-08Fixed #29623 -- Fixed translation failure of DurationField's "overflow" ↵Tim Graham
error message.
2018-07-30Fixed #26819 -- Fixed BaseModelFormSet.validate_unique() "unhashable type: ↵Demur Nodia
list" crash.
2018-06-07Fixed #29474 -- Simplified BaseInlineFormset.save_new().Tim Graham
2018-04-23Refs #28312 -- Added an optimized __bool__() to ModelChoiceIterator.François Freitag
COUNT is more expensive than EXISTS; use the latter when possible.
2018-04-23Fixed #28312 -- Made ModelChoiceIterator.__len__() more memory-efficient.François Freitag
Instead of loading all QuerySet results in memory, count the number of entries. This adds an extra query when list() or tuple() is called on the choices (because both call __len__() then __iter__()) but uses less memory since the QuerySet results won't be cached. In most cases, the choices will only be iterated on, meaning that __len__() won't be called and only one query will be executed.
2018-04-19Ref #23919 -- Replaced some os.path usage with pathlib.Path.Tom
2018-04-04Fixed #29284 -- Made ImageField render with accept="image/*"' HTML attribute.safu9
2018-04-02Fixed #29273 -- Prevented initial selection of empty choice in multiple ↵Claude Paroz
choice widgets. Regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01.
2018-03-31Fixed #29279 -- Added renderer argument to ModelForm.Dan Watson
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2018-03-15Fixed #29200 -- Fixed label rendering when using RadioSelect and ↵Tim Graham
CheckboxSelectMultiple with MultiWidget.
2018-03-03Condensed some widgets code.Daniel Hahler
2018-03-01Fixed #29159 -- Made ModelChoiceIterator reuse QuerySet result cache.François Freitag
When __len__() is called (e.g. when casting to list or tuple), the QuerySet is evaluated and the result cache populated. iterator() shouldn't be called on the QuerySet after that, as it would reset the result cache and trigger a second query.
2018-03-01Fixed #29158 -- Fixed len(choices) crash if ModelChoiceField's queryset is a ↵François Freitag
manager. Removing all() in __iter__() prevents a duplicate query when choices are cast to a list and there's a prefetch_related().
2018-02-26Refs #28909 -- Simplifed code using unpacking generalizations.Mariusz Felisiak
2018-02-15Fixed #28171 -- Added an exception if Form's empty_permitted and ↵Herbert Parentes Fortes Neto
use_required_attribute arguments conflict.
2018-02-05Fixed #29113 -- Simplified django.forms.formsets.all_valid() and clarified ↵Tim Graham
docstring.
2018-01-30Fixed #29036 -- Fixed HTML5 required validation on SelectDateWidget if the ↵Vlastimil Zíma
attribute is added by JavaScript. Thanks Tim Graham for the initial patch.
2018-01-30Fixed #29089 -- Avoided redundant date parsing in ↵Tim Graham
SelectDateWidget.format_value().
2018-01-21Fixed #29038 -- Removed closing slash from HTML void tags.Jon Dufresne
2018-01-20Fixed #29041 -- Changed SelectMultiple's multiple attribute to HTML5 boolean ↵Jon Dufresne
syntax.
2018-01-18Removed unnecessary microsecond truncation in SplitDateTimeWidget.Jon Dufresne
The microseconds are already truncated by the TimeInput subwidget.
2018-01-18Refs #23668 -- Removed passing default argument of current TZ to ↵Jon Dufresne
make_aware()/naive.
2018-01-12Fixed #28996 -- Simplified some boolean constructs and removed trivial ↵Дилян Палаузов
continue statements.
2018-01-11Refs #29006 -- Simplified handling of SNaN values in DecimalField.validate().Sergey Fedoseev
2018-01-10Fixed #29006 -- Fixed DecimalField.clean() crash on sNaN values.Fabio Bonelli
2018-01-05Fixed #28882 -- Fixed cleaning of disabled MultiValueFields.Tim Graham
Thanks avalanchy for the initial patch.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2018-01-03Fixed #28985 -- Removed unneeded None checks before hasattr().Дилян Палаузов
2017-12-30Used Decimal.scaleb() in backends.utils.format_number() and ↵Mariusz Felisiak
DecimalField.widget_attrs() to improve performance.
2017-12-26Fixed #28930 -- Simplified code with any() and all().Дилян Палаузов
2017-12-11Fixed #28874 -- Prevented double escaping of errors on hidden form fields.Daniil
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-12-08Simplified widgets.Select._choice_has_empty_value().Sergey Fedoseev
2017-12-07Fixed #28906 -- Removed unnecessary bool() calls.Tim Graham
2017-12-05Fixed #28890 -- Removed newlines between MultiWidget's subwidgets.Nick Pope
Regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01.
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-11-14Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().Дилян Палаузов
2017-11-07Fixed #28769 -- Replaced 'x if x else y' with 'x or y'.Дилян Палаузов
2017-10-25Fixed #28474 -- Made DurationField raise ValidationError for inputs that ↵Srinivas Reddy Thatiparthy
raised OverflowError.
2017-09-22Refs #15667 -- Removed support for Widget.render() methods without the ↵Tim Graham
renderer argument. Per deprecation timeline.
2017-09-13Removed unnecessary parens in various code.Mariusz Felisiak
2017-09-13Merged isinstance() calls.Mariusz Felisiak
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-09-05Fixed #28555 -- Made CharField convert whitespace-only values to the ↵Josh Schneier
empty_value when strip is enabled.
2017-08-31Removed useless itertools.chain() call in ChoiceWidget.optgroups().Sergey Fedoseev
2017-08-29Fixed #28530 -- Prevented SelectDateWidget from localizing years in output.caleb logan
2017-08-26Added Media.__repr__().Collin Anderson
It makes it easier to debug MediaOrderConflictWarnings (refs #28377).
2017-08-12Fixed #28201 -- Added ProhibitNullCharactersValidator and used it on ↵Alejandro Zamora
CharField form field.
2017-08-09Simplified Float/DecimalField.validate() with math.isfinite().Srinivas Reddy Thatiparthy