summaryrefslogtreecommitdiff
path: root/django/forms/fields.py
AgeCommit message (Collapse)Author
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
2013-06-13Fixed #20594 -- Add validation to models.SlugField.Baptiste Mispelon
Thanks carbonXT for the report.
2013-05-18Fixed #20440 -- Ensured CharField's max_length/min_length are integersTome Cvitan
2013-05-18Added stripping of whitespace for SlugField and URLFieldDeni Bertovic
2013-05-14Fixed #19934 - Use of Pillow is now preferred over PIL.Daniel Lindsley
This starts the deprecation period for PIL (support to end in 1.8).
2013-04-13Fixed #17840 -- Generalized named placeholders in form error messagesClaude Paroz
Also fixed plural messages for DecimalField.
2013-03-25Removed forced typecasting of help_text/label Field argumentsClaude Paroz
In any case, setting those variables to non-ascii utf-8 bytestrings is now considered a programming error.
2013-03-20Fixed #18839 - Field.__init__() now calls super().Carny Cheng
2013-03-19Fixed #18003 -- Preserved tracebacks when re-raising errors.konarkmodi
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2013-03-14Fixed #17051 -- Removed some 'invalid' field error messagesClaude Paroz
When the 'invalid' error message is set at field level, it masks the error message raised by the validator, if any.
2013-03-14Fixed #20039 -- Fixed has_changed form detection for required TypedChoiceFieldsClaude Paroz
Thanks Florian Apolloner for the report and the review. Also fixes #19643.
2013-03-07Fixed #19997 -- Added custom EMPTY_VALUES to form fieldsClaude Paroz
Thanks Loic Bistuer for the report and the patch.
2013-03-01Fixed #16612 -- Improved has_changed detection for localized field valuesClaude Paroz
Thanks Simon Charette for the review.
2013-02-23Fixed errors introduced in 21f333bcefccc151d6439246f8203d609ab6ca79. Refs #17751Florian Apolloner
2013-02-23Fix #17751: Added stripping of whitespace for ↵Erik Romijn
IPAddressField/GenericIPAddressField
2013-02-23Fixed #19686 -- Added HTML5 number input typeClaude Paroz
Thanks Simon Charette for his help on the patch. Refs #16630.
2013-01-30Fixed #19034 -- Added proper i18n pluralization for max/min length ↵Claude Paroz
validation messages This was made possible by commit 3f1a0c0040b9. Thanks Evil Clay for the report and Alexey Boriskin his work on the ticket.
2013-01-28Added HTML5 url input typeClaude Paroz
Refs #16630.
2013-01-28Added HTML5 email input typeClaude Paroz
Refs #16630.
2013-01-26Fixed #16123 -- Ensured strptime receive proper string typeClaude Paroz
strptime generates an UnicodeEncodeError when using a non-ascii unicode string on Python 2.
2013-01-26Moved BooleanField 'required' validation in validate()Claude Paroz
2013-01-25Moved has_changed logic from widget to form fieldClaude Paroz
Refs #16612. Thanks Aymeric Augustin for the suggestion.
2012-09-26Fixed #17899 -- Rewrote [Ee]-mail to [Ee]mailAdrien Lemaire
2012-09-23Fixed #18982 - Caught TypeError in DateField.cleanAymeric Augustin
Thanks gwahl at fusionbox com.
2012-09-10Document and test 'type' usage in Widget attrsClaude Paroz
Refs #16630.
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-07-30Fixed second security issue in image uploading. Disclosure and release ↵Florian Apolloner
forthcoming.
2012-07-22[py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin
Lots of functions were moved. Use explicit imports in all cases to keey it easy to identify where the functions come from.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-31Fixed #18409 -- Made RegexField work with unicode characters.Julien Phalip
2012-05-16Hidden __pycache__ dirs for FilePathField. Refs #17393.Claude Paroz
This will be tested as soon as tests will run under Python 3. Patch taken from Vinay Sajip's Python 3 branch.
2012-05-05Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz
Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-22Fixed #5893 -- Added a flag to FilePathField to allow listing folders, in ↵Alex Gaynor
addition to regular files. Thank you to Brian Rosner, for encouraging me to first contribute to Django 4 years ago. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-05Removed pre-2.6 compatibility code in date-based form fields. Refs #9459.Claude Paroz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated URLField.verify_exists.Aymeric Augustin
The deprecation schedule was slightly accelerated because of possible security ramifications. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29Fixed #11150 -- Removed dependency on cStringIO in ImageField validation. ↵Claude Paroz
Thanks vvd for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04Fixed #14184 -- Enabled running the validators in MultiValueFields. Thanks, ↵Jannis Leidel
paulcollins. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17430 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-15Fixed #15912 -- Ensured that `forms.CharField.widget_attrs()` always returns ↵Julien Phalip
a dictionary. Thanks to tsabi and rubyruy for the report and to mmcnickle and prestontimmons for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13Fixed #17134: Corrected Python 2.5 fallback code for parsing microseconds in ↵Karen Tracey
time values. Thanks aaugustin and jcd. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-07Fixed #17125 -- Made it possible to change a `RegexField`'s regular ↵Julien Phalip
expression validator after it has been initialized. Thanks to Claude Paroz for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-28Fixed #17127 -- Made field validators list independent per form instance. ↵Carl Meyer
Thanks claudep for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17046 bcc190cf-cafb-0310-a4f2-bffc1f526a37