summaryrefslogtreecommitdiff
path: root/django/forms/fields.py
AgeCommit message (Collapse)Author
2015-02-14[1.8.x] Added missing return value to DurationField.prepare_value(); refs ↵Michael Angeletti
#24339. Backport of 49647bec6e86b8d3d370ea1d8a80423185502c5a from master
2015-02-14[1.8.x] Fixed #24339 -- Fixed crash with empty DurationField form field.Michael Angeletti
Backport of 8a21d250334f56845f255be5534b01d8c6eda314 from master
2015-02-09[1.8.x] Sorted imports with isort; refs #23860.Tim Graham
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
2014-12-20Fixed #2443 -- Added DurationField.Marc Tamlyn
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-12Fixed #23674 -- Fixed a crash when a MultiValueField has invalid data.Grzegorz Slusarek
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-11-12Fixed #23795 -- Fixed a regression in custom form fieldsBaptiste Mispelon
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-04Fixed #13181 -- Added support for callable choices to forms.ChoiceFieldPeter Inglesby
Thanks vanschelven and expleo for the initial patch.
2014-09-16Fixed #19463 -- Added UUIDFieldMarc Tamlyn
Uses native support in postgres, and char(32) on other backends.
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-08-15Fixed #23162 -- Renamed forms.Field._has_changed() to has_changed().Gabriel Muñumel
2014-08-03Fixed #23151 -- Deprecated RegexField.error_message.Tim Graham
Thanks Baptiste Mispelon for the suggestion.
2014-08-01Fixed #23103 -- Annotated ImageField file with image and content_type ↵Petras Zdanavičius
attributes. Thanks Jeremy Dunck for the suggestion and Nick Sanford for review.
2014-07-29Fixed #23129 -- Added 'true' and 'false' to `NullBooleanField`.Kit La Touche
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-06-21Prevented evaluation of a possible lazy messageClaude Paroz
As far as possible, message evaluation should not happen in field __init__ (often run at import time).
2014-05-28Fixed several typos in DjangoAlex Gaynor
2014-05-13Fixed #22533 -- Added label_suffix parameter to form fields.Julen Ruiz Aizpuru
Fields can now receive the `label_suffix` attribute, which will override a form's `label_suffix`. This enhances the possibility to customize form's `label_suffix`, allowing to use such customizations while using shortcuts such as `{{ form.as_p }}`. Note that the field's own customization can be overridden at runtime by using the `label_prefix` parameter to `BoundField.label_tag()`. Refs #18134.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-03-26Fixed #22114 -- Stopped adding trailing slashes in URLField.to_pythonClaude Paroz
Thanks coredumperror at gmail.com for the report and Tim Graham for the review.
2014-03-21Removed PIL compatability layer per deprecation timeline.Tim Graham
refs #19934.
2014-03-13Fixed #22245 -- Avoided widget overwrite in forms.IntegerField subclassesClaude Paroz
Thanks Jeroen Pulles for the report and Simon Charette for the review.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-05Fixed #22206 -- Passed models.TextField.max_length to forms.CharField.maxlengthChris Wilson
2014-02-20Fixed #22097 -- Fixed change detection for TypedChoiceFieldClaude Paroz
Thanks Igor Mitrenko for the report.
2014-02-11Fixed #2445 -- Allowed limit_choices_to attribute to be a callable.Christopher Adams
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now be a callable that returns either a ``Q`` object or a dict. Thanks michael at actrix.gen.nz for the original suggestion.
2014-01-11Fixed #8898 -- Obsoleted SplitDateTimeWidget usage with DateTimeFieldClaude Paroz
Thanks Tim Graham for the review.
2014-01-11Fixed #21752 -- Prevented custom widget step attribute to be overwrittenClaude Paroz
Thanks orcein at gmail.com for the report.
2013-12-16Removed duplicated `TimeField` in __all__.Artur Barseghyan
2013-12-16Fixed #17413 -- Serialization of form errors along with all metadata.Loic Bistuer
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-18Fixed #21397 -- Re-added flexibility to TypedChoiceField coercionClaude Paroz
Thanks Elec for the report and Simon Charette for the review.
2013-11-02Merge pull request #1848 from rayashmanjr/masterAlex Gaynor
Correct flake8 violation E261
2013-11-02Correct flake8 violation E261Ray Ashman Jr
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-10-11Fixed assorted flake8 errors.Tim Graham
2013-09-28Fixed #20439 -- Started deprecation of IPAddressFieldErik Romijn
2013-09-21Ensured that BoundField.as_widget always returns properly localized fields.Florian Apolloner
This is a follow-up to #18777 which improperly converted to strings in prepare_value and as such caused regressions like #21074. Refs #18777, #21074
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-10Fixed #19298 -- Added MultiValueField.__deepcopy__Tim Graham
Thanks nick.phillips at otago.ac.nz for the report.
2013-09-06Fixed #4287 -- Fixed NaN and +/- Infinity handling in FloatFieldDaniel Langer
NaN, +Inf, and -Inf are no longer valid values for FloatFields.
2013-09-05Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
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-08-02Fixed #18777 -- Localized form fields with as_text/as_hiddenAleksandra Sendecka
Thanks croldan for the report.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-07-22Fixed #20781 -- Fixed _has_changed regression with MultiValueFieldClaude Paroz
Thanks Tim Graham for the report.
2013-07-19Fixed #20765 -- Set small values of `step` using exponential notation.Simon Charette
Browsers parse small factors of 10 as 0 under decimal notation. Thanks to Trac alias matklad for the report and Claude Paroz for the review.
2013-06-20Fixed #20630 -- Removed `maxlength` attribute from `NumberInput`.Simon Charette
This attribute is only allowed on inputs of type "text", "search", "url", "tel", "email", or "password". Thanks to yoyoma for the report and @bmispelon for the review.
2013-06-18Fixed #20199 -- Allow ModelForm fields to override error_messages from model ↵Loic Bistuer
fields
2013-06-18Refactored ValidationError to allow persisting error params and error codes ↵Loic Bistuer
as the exception bubbles up