summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms/fields.py
AgeCommit message (Collapse)Author
2010-09-13[soc2010/app-loading] merged trunkarchive/soc2010/app-loadingArthur Koziel
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee
workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-28Fixed #12989 - Fixed verification of IDN URLs. Thanks to Fraser Nevett for ↵Jannis Leidel
the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22Fixed #7777 -- Added validation handling for NaN, Inf and -Inf in ↵Russell Keith-Magee
DecimalFields. Thanks to thebitguru for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-21Fixed #9764 - Updated EmailField and URLField to support IDN ↵Jannis Leidel
(Internationalized Domain Names). Thanks, UloPe. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12474 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05Merged soc2009/model-validation to trunk. Thanks, Honza!Joseph Kocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13Converted regressiontests/forms/fields.py to unittestsBrian Rosner
This makes merging in the soc2009/model-validation simpler and rids us a little bit more of awful doctests. Thanks Honza! git-svn-id: http://code.djangoproject.com/svn/django/trunk@11858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-09SECURITY ALERT: Corrected regular expressions for URL and email fields.Jacob Kaplan-Moss
Certain email addresses/URLs could trigger a catastrophic backtracking situation, causing 100% CPU and server overload. If deliberately triggered, this could be the basis of a denial-of-service attack. This security vulnerability was disclosed in public, so we're skipping our normal security release process to get the fix out as soon as possible. This is a security related update. A full announcement, as well as backports for the 1.1.X and 1.0.X series will follow. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02Fixed #9609 -- Modified the clean method of(Null)Boolean field to accept '1' ↵Russell Keith-Magee
and '0' as valid inputs. Thanks to psagers for the patch. This is required to support the use of non-default form widgets such as RadioSelect when the data comes from MySQL, which uses 1/0 to represent booleans. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16Fixed #9948 -- Corrected URLField validation to match RFC1035 (URL analog of ↵Russell Keith-Magee
#9890). Thanks to kratorius for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16Fixed #9890 -- Modified the regex validation for email addresses to match ↵Russell Keith-Magee
RFC822/1035. Thanks to ozgur for the report, and kratorius for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #10149. FileFields in a form now validate max_length. Based on a patch ↵Joseph Kocherhans
by Massimo Scamarcia. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Add tests mistakenly left out of r9397.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #7064: Made DemicmalField validation support max_digits equal to ↵Karen Tracey
decimal_places. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #6035 -- Gave the SplitDateTimeField the proper default widget. ↵Karen Tracey
Thanks dtulig. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17Fixed #8865 -- Improved the robustness of some file path tests.Malcolm Tredinnick
Based on a patch from pythonhead@gentoo.org. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31Added a `TypedChoiceField` which acts just like `ChoiceField`, except that itJacob Kaplan-Moss
returns a value coerced by some provided function. Refs #6967. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8771 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed #7753: clean `NullBooleanField` correctly when using `HiddenInput`. ↵Jacob Kaplan-Moss
Thanks to julien and ElliottM. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15Fixed #8290 -- Fixed DecimalField's cleaning of values with a large number ↵Gary Wilson Jr
of decimal places, based on patch from dgouldin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02Fixed #7920 -- Made tests compatible with Python 2.6's Decimal repr change, ↵Gary Wilson Jr
patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26Fixed #7345 -- When normalising the URLField form field, attach a trailingMalcolm Tredinnick
slash when only a host (no path) is given. Thanks, jpwatts. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Fixed #6009 -- Added regression tests to show that uploading non-ASCIIMalcolm Tredinnick
filenames now works properly. Patch from Leah Culver. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Fixed #4412 -- Added support for optgroups, both in the model when defining ↵Russell Keith-Magee
choices, and in the form field and widgets when the optgroups are displayed. Thanks to Matt McClanahan <cardinal@dodds.net>, Tai Lee <real.human@mrmachine.net> and SmileyChris for their contributions at various stages in the life of this ticket. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Fixed #7741: django.newforms is now django.forms. This is obviously a ↵Jacob Kaplan-Moss
backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07Fixed #7614: the quickening has come, and there now is only one ↵Jacob Kaplan-Moss
UploadedFile. On top of that, UploadedFile's interface has been improved: * The API now more closely matches a proper file API. This unfortunately means a few backwards-incompatible renamings; see BackwardsIncompatibleChanges. This refs #7593. * While we were at it, renamed chunk() to chunks() to clarify that it's an iterator. * Temporary uploaded files now property use the tempfile library behind the scenes which should ensure better cleanup of tempfiles (refs #7593 again). Thanks to Mike Axiak for the bulk of this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01Fixed #2070: refactored Django's file upload capabilities.Jacob Kaplan-Moss
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues. This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30Fixed #5957 -- Enforce the "required" attribute on BooleanField in newforms.Malcolm Tredinnick
This has been the documented behaviour for ages, but it wasn't correctly implemented. A required BooleanField must be True/checked, since False values aren't submitted. Ideal for things like "terms of service" agreements. Backwards incompatible (since required=True is the default for all fields). Unclear who the original patch was from, but Tai Lee and Alex have kept it up to date recently. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-28Fixed the fix from [7775].Malcolm Tredinnick
The previous change was failing Django's "check for well-formed domain name" validation, rather than failing on the network side. Providing we don't ever set up www.broken.djangoproject.com as a valid domain name, this change should let us control our own destiny. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-27Fixed #7559 -- Updated newforms unit tests to reflect the fact that ↵Adrian Holovaty
http://www.jfoiwjfoi23jfoijoaijfoiwjofiwjefewl.com is no longer a valid domain name git-svn-id: http://code.djangoproject.com/svn/django/trunk@7775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-24Fixed #6868 -- Fixed test results for Windows systems. Thanks, Ned Batchelder.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19Fixed #5894: added FilePathField to newforms. Thanks, Alex Gaynor.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-17Fixed #6302. FileField no longer requires a value if one already exists. ↵Joseph Kocherhans
Thanks Brian Rosner and Øyvind Saltvik. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29Fixed #6014 -- More robust error handling when validating decimal fields.Malcolm Tredinnick
Thanks, pigletto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29Fixed #5959 -- Fixed handling of False values in hidden boolean fields. Thanks,Malcolm Tredinnick
SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19Fixed #5546: split form unit tests into manageable chunks. This isn't a ↵Jacob Kaplan-Moss
perfect fix since the chunks aren't yet autodiscovered, but that shouldn't prevent checking this in. Thanks, Leo Soto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6379 bcc190cf-cafb-0310-a4f2-bffc1f526a37