Commit Graph

581 Commits

Author SHA1 Message Date
Claude Paroz 8714403614 Fixed #24428 -- Fixed has_changed for fields with coercion
Thanks Carsten Fuchs for the report.
2015-03-05 09:00:13 +01:00
Claude Paroz 4b8979e477 Fixed #17401 -- Made SelectDateWidget.render reflect wrong value
Thanks Marcin Wrobel for the initial patch.
2015-03-01 21:37:52 +01:00
Jon Dufresne 3b966c2b73 Fixed #24229 -- Changed IntegerField to clean floats representing integers 2015-02-27 12:23:21 +01:00
Michael Angeletti 65441bbdb0 Fixed #24391 -- Made BoundField.value() cache callable values. 2015-02-24 19:50:55 -05:00
Stanislas Guerra 4c2f546b55 Fixed #24395 -- Ensured inline ModelsForms have an updated related instance. 2015-02-24 11:49:00 -05:00
Tim Graham 1306cd1e8a Fixed #24377 -- Fixed model inline formsets with primary key's that have defaults. 2015-02-23 08:44:27 -05:00
Michael Angeletti 49647bec6e Added missing return value to DurationField.prepare_value(); refs #24339. 2015-02-14 18:38:50 -05:00
Michael Angeletti 8a21d25033 Fixed #24339 -- Fixed crash with empty DurationField form field. 2015-02-14 07:37:18 -05:00
Loic Bistuer 00a889167f Fixed #24295 -- Allowed ModelForm meta to specify form field classes.
Thanks Carl Meyer and Markus Holtermann for the reviews.
2015-02-13 19:13:05 +07:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Tim Graham bbe28496d3 Removed old import aliases. 2015-02-05 19:37:01 -05:00
Loic Bistuer 728b6fd9ca Fixed #24219 -- Moved SelectDateWidget together with the other widgets
and deprecated django.forms.extras.

Thanks Berker Peksag and Tim Graham for the reviews.
2015-01-27 22:40:02 +07:00
Adam Taylor 039465a6a7 Fixed typos in code comments. 2015-01-20 12:18:03 -05:00
Tim Graham 33457cd3b0 Removed IPAddressField per deprecation timeline; refs #20439. 2015-01-19 11:12:57 -05:00
Tim Graham 9704b0a82e Removed forms.forms.get_declared_fields() per deprecation timeline; refs #19617. 2015-01-18 15:55:01 -05:00
Tim Graham 714277cb4c Removed support for SplitDateTimeWidget with DateTimeField per deprecation timeline.
refs #8898
2015-01-17 18:49:44 -05:00
Tim Graham 2b4ca2ec29 Removed unused imports. 2015-01-17 14:42:51 -05:00
Tim Graham 2788c46d46 Removed Multiple/ModelChoiceField cache_choices option; refs #22838. 2015-01-17 13:48:46 -05:00
Tim Graham 37b7776a01 Removed django.utils.datastructures.MergeDict per deprecation timeline; refs #18659. 2015-01-17 08:13:36 -05:00
Tim Graham 9ce36512fa Removed backwards compatibility shims for "util" modules per deprecation timeline.
refs #17627.
2015-01-17 07:40:12 -05:00
Yang Liu 3f9ec12d9c Fixed #23712 -- Fixed KeyError with BaseForm._html_output() 2015-01-15 20:19:53 -05:00
Tim Graham baf2542c4f Fixed DoS possibility in ModelMultipleChoiceField.
This is a security fix. Disclosure following shortly.

Thanks Keryn Knight for the report and initial patch.
2015-01-13 13:03:06 -05:00
Josh Schneier 3844ccc958 Fixed #24138 -- Added modelform_factory to __all__. 2015-01-12 17:44:06 -05:00
Daniel Pyrathon fb48eb0581 Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Anssi Kääriäinen f233bf47dd Fixed #21414 -- Removed RelatedObject and deprecated Field.related. 2014-12-23 10:54:25 -05:00
Marc Tamlyn 57554442fe Fixed #2443 -- Added DurationField.
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.

Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.

Thanks to Tim and Josh in particular for reviews.
2014-12-20 18:28:29 +00:00
Michael Hall 895dc880eb Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range 2014-12-13 12:45:58 -05:00
Grzegorz Slusarek 0dea81cd6d Fixed #23674 -- Fixed a crash when a MultiValueField has invalid data. 2014-12-12 08:47:21 -05:00
Jon Dufresne 4468c08d70 Fixed #23968 -- Replaced list comprehension with generators and dict comprehension 2014-12-08 07:58:23 -05:00
Berker Peksag 560b4207b1 Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Simon Charette a7c3d0f288 Fixed typo in forms/models.py comment. 2014-11-21 15:59:09 -05:00
Tim Heap 5b17dcd8ef Fixed #23883 -- Stopped flatatt modifying its argument 2014-11-21 09:45:08 +01:00
Baptiste Mispelon bfb11b9562 Fixed #23795 -- Fixed a regression in custom form fields
Custom form fields having a `queryset` attribute but no
`limit_choices_to` could no longer be used in ModelForms.

Refs #2445.

Thanks to artscoop for the report.
2014-11-12 22:38:18 +01:00
Peter Inglesby 74e1980cf9 Fixed #13181 -- Added support for callable choices to forms.ChoiceField
Thanks vanschelven and expleo for the initial patch.
2014-11-04 11:23:58 -05:00
Tim Graham 984a57a9c9 Removed some commented code in the forms Media class. 2014-10-27 08:21:37 -04:00
Thomas Chaumeny fa534b92dd Fixed #23623 -- Reduced memory consumption when generating ModelChoiceField choices 2014-10-10 09:50:02 -04:00
Loic Bistuer ec2fd02bb3 Fixed #23594 -- Fixed deepcopy on ErrorList.
Thanks Troy Grosfield for the report and Tim Graham for the tests.
2014-10-07 00:09:55 +07:00
Marc Tamlyn ed7821231b Fixed #19463 -- Added UUIDField
Uses native support in postgres, and char(32) on other backends.
2014-09-16 10:08:09 +01:00
Petras Zdanavičius f7eee04ebe Fixed #23451 -- Fixed typo in inlineformset_factory() error message. 2014-09-08 17:22:23 -04:00
Tim Graham 1101467ce0 Limited lines to 119 characters in django/
refs #23395.
2014-09-05 09:22:16 -04:00
Vlastimil Zíma e622caaa85 Fixed #21201 -- Improved customization of ClearableFileInput. 2014-08-29 09:40:08 -04:00
areski a6691e5dcf Fixed #23167 -- Added BaseForm.__repr__()
Thanks Keryn Knight for the idea.
2014-08-22 15:55:56 -04:00
Gabriel Muñumel deed00c0d8 Fixed #23162 -- Renamed forms.Field._has_changed() to has_changed(). 2014-08-15 08:14:45 -04:00
Vincent-Vega 5e06fa1469 Fixed #22745 -- Prevented reevaluation of ModelChoiceField's queryset when accesssing BoundField's attrs.
Thanks Christian Schmitt for review.
2014-08-04 07:47:37 -04:00
Tim Graham 399cf303cb Corrected a comment in forms/forms.py; refs #16612. 2014-08-04 06:57:09 -04:00
Tim Graham 0f2ceee025 Fixed #23151 -- Deprecated RegexField.error_message.
Thanks Baptiste Mispelon for the suggestion.
2014-08-03 11:21:01 -04:00
Baptiste Mispelon de0a22be35 Fixed two typos in docstrings. 2014-08-02 15:14:13 +02:00
Petras Zdanavičius 8b7347220f Fixed #23103 -- Annotated ImageField file with image and content_type attributes.
Thanks Jeremy Dunck for the suggestion and Nick Sanford for review.
2014-08-01 09:30:58 -04:00
Niclas Olofsson cdc25ac474 Fixed #22808 -- Made ModelMultipleChoiceField validation more robust to invalid data types..
Thanks Mattias Lindvall for the report and inital patch.
2014-07-31 15:29:46 -04:00
Kit La Touche 17e75d03f9 Fixed #23129 -- Added 'true' and 'false' to `NullBooleanField`.
JavaScript serializations of forms will sometimes render the boolean
values as the strings 'true' and 'false', in lower case. Rather than
repeat boilerplate in the JavaScript to circumvent this, it seems
reasonable to allow Django to understand the lower-case versions of the
booleans.
2014-07-29 19:55:55 -04:00