summaryrefslogtreecommitdiff
path: root/django/newforms
AgeCommit message (Collapse)Author
2007-10-22Fixed #5794 -- Be more robust when rendering a DateTimeInput widget. Thanks,Malcolm Tredinnick
MikeH. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21Removed unwanted import that snuck into [6578].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21Changed the default form presentation of datetime values to not include theMalcolm Tredinnick
fractional second values (they usually aren't going to be needed). Based on patches from yi.codeplayer@gmail.com, andrews and Wiliam Alves de Souza. Fixed #4428, #4487 git-svn-id: http://code.djangoproject.com/svn/django/trunk@6578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21DateTimeField can now clean values that come from SplitDateTimeWidget.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20Changed newforms.CheckboxInput widget to return False as its value when notMalcolm Tredinnick
include in the form (since HTML form submission doesn't send unselected check boxes). Patch from SmileyChris. Refs #5104. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-04Changed some Widget subclasses to be consistent about how they handle the ↵Malcolm Tredinnick
passed in 'attrs' parameter. We now always copy it (by calling the parent's __init__). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-04Added a __deepcopy__() method to the Widget class in order to avoid a number ↵Malcolm Tredinnick
of easy-to-trigger problems when copying Widget subclasses. Subclasses which are intended to have extra mutable fields should override this method. Refs #5505. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16Fixed #4067 -- Fixed validation of IPAddressFields in newforms. Thanks to ↵Malcolm Tredinnick
neils and the team in the Copenhagen sprint group. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16Fixed #4975 -- Allow the default label suffix character to be configured. ↵Malcolm Tredinnick
Thanks, Vincent Foley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #5471 -- Fixed cleaning of boolean field data when it's used as a ↵Malcolm Tredinnick
hidden field. Patch from Paul Lanier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #5355 -- Fixed data cleaning for DecimalField.Malcolm Tredinnick
In passing, fixed a problem with cleaning in IntegerField. Includes tests from PhiR. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #5387 -- Added is_multipart method to forms. Original patch from Petr ↵Malcolm Tredinnick
Marhhoun. Tests and documentation from Murkt. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed some Python 2.3 unicode conversion problems. Uncovered by the tests, ↵Malcolm Tredinnick
but that was just a sign of a real bug (luckily!). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #3848 -- Added more comprehensive checks to ImageField validation, ↵Russell Keith-Magee
checking for image truncation or corruption. Thanks to Andrew C <andrewc-djangotrac1@piffle.org> for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fiex #5331 -- Modified newforms URLField to prepend http:// if no protocol ↵Russell Keith-Magee
is specified by the user. Thanks, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #3489 -- Added proper deepcopying to form fields so that widget ↵Malcolm Tredinnick
instances get copied as well. Patch from Jonathan Buchanan and insin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #3421 -- Added IP and localhost validation to newforms URLField. ↵Russell Keith-Magee
Thanks, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Fixed #4752 -- Make default ErrorList customisable in newforms display. ↵Malcolm Tredinnick
Based on a patch from michal@logix.cz and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Fixed #5370 -- Allow lazy translations in ValidationError classes. Patch ↵Malcolm Tredinnick
from James Bennett. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-11Fixed #4478 -- Added a catch for an error thrown by PIL when attempting to ↵Russell Keith-Magee
validate MS OLE files. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-08Fixed imports to adhere to PEP 8 and stripped trailing whitespace.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-08Fixed #5232 -- Fixed the validation of `DecimalField` so that the negative ↵Gary Wilson Jr
sign is not counted as a digit. Thanks, Andrew Durdin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12Fixed #5095 -- newforms now checks for EnvironmentError when importing ↵Adrian Holovaty
settings. Thanks, SmileyChris git-svn-id: http://code.djangoproject.com/svn/django/trunk@5861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12Fixed #4622 -- Fixed SelectDateWidget to work correctly when used as a ↵Malcolm Tredinnick
hidden input field. Thanks, Bill Fenner. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-06Fixed #3297 -- Implemented FileField and ImageField for newforms. Thanks to ↵Russell Keith-Magee
the many users that contributed to and tested this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05Fixed #4001 -- Added dynamic save_m2m method() to forms created with ↵Russell Keith-Magee
form_for_model and form_for_instance on save(commit=False). git-svn-id: http://code.djangoproject.com/svn/django/trunk@5804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms ↵Gary Wilson Jr
`FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-01Fixed #4228 -- Removed hardcoding of `RadioFieldRenderer` in the ↵Gary Wilson Jr
`RadioSelect` Widget so that the display of `RadioSelect`s can be more easily customized. `BoundField.__unicode__` also no longer special cases `RadioSelect` since `RadioSelect.render()` now returns a string like every other Widget. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-14Fixed a problem with translatable strings from [5686].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13Fixed #4469 -- Added slightly more informative error messages to max- andMalcolm Tredinnick
min-length newform validation. Based on a patch from A. Murat Eren. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13Fixed #4861 -- Removed some duplicated logic from the newforms RegexField byMalcolm Tredinnick
making it a subclass of CharField. Thanks, Collin Grady. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13Fixed #4807 -- Fixed a couple of corner cases in decimal form input validation.Malcolm Tredinnick
Based on a suggestion from Chriss Moffit. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12Fixed #4755 -- Modified newforms MultipleChoiceField to use list ↵Russell Keith-Magee
comprehension, rather than iteration. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-01Added some clearer docstrings to MultiValueField and MultiWidgetAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. AllMalcolm Tredinnick
expected tests pass for all databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23Fixed #4527 -- Changed the way errors are displayed in Form.as_p() to avoidMalcolm Tredinnick
invalid XHTML constructs. Based on a patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23Fixed #4630 -- Fixed some validation problems with SplitDateTimeField. ThanksMalcolm Tredinnick
glin@seznam.cz and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23Fixed #4607 -- Tweaked checks for features missing in Python 2.3 to not assumeMalcolm Tredinnick
things Python does not guarantee. Patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-15Fixed #3972 -- Updated docstring. Patch from SmileyChris.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5471 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26Fixed #3718 -- Exposed form errors to cleaning methods as soon as they areMalcolm Tredinnick
available. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26Fixed #4297 -- Made form errors available to sub-classes. Thanks, Gary Wilson.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26Fixed #4390, #4385 -- Made it clear that cleaned_data wasn't being assigned toMalcolm Tredinnick
twice without reason. Also make sure that if field specific clean functions fail, the form-wide field cleaning is removed from cleaned_data. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the codeMalcolm Tredinnick
to return Decimal instances in Python for this field. Backwards incompatible change. Added a real FloatField (stores floats in the database) and support for FloatField and DecimalField in newforms (analogous to IntegerField). Included decimal.py module (as django.utils._decimal) from Python 2.4. This is license compatible with Django and included for Python 2.3 compatibility only. Large portions of this work are based on patches from Andy Durdin and Jorge Gajon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19Fixed #4316 -- Added docstring and tests for django.newforms.utils.flatatt().Malcolm Tredinnick
Thanks, Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-16Fixed #4318 -- Fixed unused imports and other various style tweaks in ↵Adrian Holovaty
newforms. Thanks, Gary Wilson git-svn-id: http://code.djangoproject.com/svn/django/trunk@5263 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14Changed the fix from [5231] so that the backwards-incompatibility is made moreMalcolm Tredinnick
obvious and everything still has nice names. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14Renamed form-specific cleaning methods to be do_clean_*, rather than clean_*.Malcolm Tredinnick
This avoids a name clash that would occur when you had a form field called "data" (because clean_data is already a dictionary on the Form class). Backwards incompatible change. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12Fixed #4018 -- Added code to allow callables as initial data in newforms. ↵Russell Keith-Magee
Thanks for the patch, David Danier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12Added docs for form_for_model and form_for_instance, and added a fields ↵Russell Keith-Magee
argument so it is easy to create forms from a subset of model fields. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5202 bcc190cf-cafb-0310-a4f2-bffc1f526a37