summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms
AgeCommit message (Collapse)Author
2008-12-05Added a way to iterate over hidden/visible fields in a form. Useful for manualMalcolm Tredinnick
form layout. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9569 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-11-06Fixed #6160, #9111 -- Consistently apply conditional_escape to form errors ↵Karen Tracey
and labels when outputing them as HTML. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05Fixed #9259 -- Fixed a validation error for Spanish identity card numbers.Malcolm Tredinnick
Patch from Marc Garcia. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-18Fixed #9125 -- When displaying errors for a form with only hidden fields, ↵Malcolm Tredinnick
make sure the resulting XHTML is correct. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9067 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-09-01Fixed #7975 -- Callable defaults in inline model formsets now work ↵Brian Rosner
correctly. Based on patch from msaelices. Thanks for your hard work msaelices. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8816 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-31Fixed #5216 -- Fixed a case of a string not being a unicode string.Malcolm Tredinnick
Thanks to Vadim Fint for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8761 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-27Fixed #8276: corrected another couple of names in localflavor.pl.forms. ↵Jacob Kaplan-Moss
Patch by Piotr Lewandowski. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26Fixed #8566 -- Allow safe-strings in the "attrs" parameter to form widgets.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed #8425: removed the independant nations of Palau, Marshall Islands, and ↵Jacob Kaplan-Moss
Micronesia from localflavor's list of US states. ... Man, commit messages like that are incredibly fun to write. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Updated `TimeInput` changes from [8491] to allow time widgets to be used ↵Jacob Kaplan-Moss
with unicode values. Fixes #7499. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed #7195 -- Fixed the validation of MultipleChoice fields so that they canMalcolm Tredinnick
be populated from request.REQUEST. Based on a patch from Daniel Roseman. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Fixed #7499 -- Trim microseconds off rendering of form.TimeFields by default soMalcolm Tredinnick
that they validate. Previous code didn't work with microseconds anyway, so this is backwards compatible. Thanks to kevin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20Fixed #8434 -- I forgot to update the tests when committing [8443]. Thanks,Malcolm Tredinnick
jarrow. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16Fixed #8229: Added handling for a special case in the validation of Spanish ↵Russell Keith-Magee
ID numbers. Thanks to Marc Garcia for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8405 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-14Fixed #8276 -- Changed the names of a few Polish localflavor classes to matchMalcolm Tredinnick
their common names/acronyms, similar to other localflavors. Backwards incompatible if you're using these classes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10Fixed #7830 -- Removed all of the remaining, deprecated, non-oldforms features:Gary Wilson Jr
* Support for representing files as strings was removed. Use `django.core.files.base.ContentFile` instead. * Support for representing uploaded files as dictionaries was removed. Use `django.core.files.uploadedfile.SimpleUploadedFile` instead. * The `filename`, `file_name`, `file_size`, and `chuck` properties of `UploadedFile` were removed. Use the `name`, `name`, `size`, and `chunks` properties instead, respectively. * The `get_FIELD_filename`, `get_FIELD_url`, `get_FIELD_size`, and `save_FIELD_file` methods for Models with `FileField` fields were removed. Instead, use the `path`, `url`, and `size` attributes and `save` method on the field itself, respectively. * The `get_FIELD_width` and `get_FIELD_height` methods for Models with `ImageField` fields were removed. Use the `width` and `height` attributes on the field itself instead. * The dispatcher `connect`, `disconnect`, `send`, and `sendExact` functions were removed. Use the signal object's own `connect`, `disconnect`, `send`, and `send` methods instead, respectively. * The `form_for_model` and `form_for_instance` functions were removed. Use a `ModelForm` subclass instead. * Support for importing `django.newforms` was removed. Use `django.forms` instead. * Support for importing `django.utils.images` was removed. Use `django.core.files.images` instead. * Support for the `follow` argument in the `create_object` and `update_object` generic views was removed. Use the `django.forms` package and the new `form_class` argument instead. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8291 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-27Fixed #6427 -- Added some more features to the Austrian localflavor.Malcolm Tredinnick
Thanks, Horst Gutmann. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8113 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-26Fixed #7686 -- Added an Austrian localflavor. Thanks, bernd.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23Made the semi-private _max_form_count live on the public API of formsets by ↵Brian Rosner
renaming it to max_num. This also removes the ManagementForm use of MAX_COUNT since that usage should just be referenced to the formset's max_num property. Refs #7899. Thanks Peter of the Norse for straightening me out. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21Corrected typo.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Fixed #7763 -- Added a Romanian localflavor. Thanks, MihaiD.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7989 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-18Merged the newforms-admin branch into trunk.Brian Rosner
This is a backward incompatible change. The admin contrib app has been refactored. The newforms module has several improvements including FormSets and Media definitions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 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-06-18Fixed #4860: added 'for' attributes to labels in newforms widgets. Thanks to ↵Jacob Kaplan-Moss
Ivan Sagalaev and batiste@dosimple.ch for the patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16Fixed #7456 -- Removed check of exact IndexError exception text in a unit ↵Adrian Holovaty
test, for Jython compatibility. Thanks, leosoto git-svn-id: http://code.djangoproject.com/svn/django/trunk@7646 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-20Fixed #5917 -- More error robustness in date parsing in SelectDateWidget, plusMalcolm Tredinnick
keep the original date selected on redisplay, even if it was bogus (e.g. 31 Feb). Patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7337 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-03-19Replaced dict reprs in tests with explicit looks at each key. This should ↵Jacob Kaplan-Moss
fix many spurious test failures on other VMs (first noticed on Jython). git-svn-id: http://code.djangoproject.com/svn/django/trunk@7322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18Fixed #6230: Fixed the addition of id values to the select widgets inMalcolm Tredinnick
SelectDateWidget. Thanks, Matt McClanahan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7291 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
2008-01-02Fixed #6291 -- Fixed error in CASocialInsuranceNumberField documentation and ↵Adrian Holovaty
error message. Thanks, jeff+django@ivany.org and arien git-svn-id: http://code.djangoproject.com/svn/django/trunk@6985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-19Fixed #5670 -- Changed the validation of the UK postcode widget to allow for ↵Malcolm Tredinnick
easier input. Normalisation still returns the same things as previously. Patch from scott@staplefish.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17Fixed #5871 -- Factored out the validation errors in localflavor form ↵Malcolm Tredinnick
fields. Brings them into line with the standard newforms fields. Patch from Jan Rademaker. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6926 bcc190cf-cafb-0310-a4f2-bffc1f526a37