summaryrefslogtreecommitdiff
path: root/tests/forms_tests
AgeCommit message (Collapse)Author
2013-10-22[1.6.x] Fixed #21307 -- Moved TransRealMixin to django.test.utils.Ramiro Morales
51d2e1fb23 from master.
2013-08-05[1.6.x] Fixed #20850 -- Added MultiWidget.needs_multipart_formTim Heap
Backport of 75c87e2d38 from master
2013-07-26[1.6.x] Fixed #20805 -- Removed an extra colon beside checkboxes in the admin.Tim Graham
Thanks CollinAnderson for the report. Backport of 8676318d2d from master
2013-07-22[1.6.x] Fixed #20781 -- Fixed _has_changed regression with MultiValueFieldClaude Paroz
Thanks Tim Graham for the report. Backport of 02b0106d from master.
2013-07-19[1.6.x] Fixed #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. Backport of 415a36947c from master.
2013-07-13[1.6.x] Fixed a deprecation warning in a selenium test.Tim Graham
Backport of 9b471a8fe3 from master
2013-06-22Fixed 17478 -- Allowed queryset overriding in BaseModelFormSet initClaude Paroz
BaseModelFormSet.forms is now a cached property instead of being populated in the __init__ method. This behaviour also matches an example in the documentation. Thanks Thomasz Swiderski for the report and Simon Charette 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 #20618 -- Fixed regression in `BoundField.label_tag`.Baptiste Mispelon
2013-06-16Fixed #20464 -- Added a `total_error_count` method on formsets.Baptiste Mispelon
Thanks to frog32 for the report and to Tim Graham for the review.
2013-06-14Fixed #20548 -- Removed all PendingDeprecationWarnings from django test suiteMarc Tamlyn
2013-06-10Fixed #18134 -- BoundField.label_tag now includes the form's label_suffixGabe Jackson
There was an inconsistency between how the label_tag for forms were generated depending on which method was used: as_p, as_ul and as_table contained code to append the label_suffix where as label_tag called on a form field directly did NOT append the label_suffix. The code for appending the label_suffix has been moved in to the label_tag code of the field and the HTML generation code for as_p, as_ul and as_table now calls this code as well. This is a backwards incompatible change because users who have added the label_suffix manually in their templates may now get double label_suffix characters in their forms.
2013-06-10Fixed available_apps for selenium tests.Aymeric Augustin
Refs #20483.
2013-06-06Fixed #12337 - Honor ModelForm.Meta.exclude when saving ManyToManyFields.Stephen Burrows
Thanks margieroginski for the report.
2013-06-06Fixed #20502 (again) -- More i18n cache flush in testsClaude Paroz
Thanks Timo Graham for noticing the failures.
2013-05-26Replaced `and...or...` constructs with PEP 308 conditional expressions.Ramiro Morales
2013-05-25Fixed #11725 -- Made possible to create widget label tag without "for"Claude Paroz
Thanks Denis Martinez for the report and initial patch, and Sergey Kolosov for bringing the patch up to date.
2013-05-22Fixed #18709 -- Check if initial_value is a callableJeroen Dekkers
In _get_changed_data, check if initial_value is a callable and call it if it is.
2013-05-21Use assertIsInstance in tests.Marc Tamlyn
Gives much nicer errors when it fails.
2013-05-20Fixed #20403 -- Ignore forms marked for deletion when validating max_num.Ryan Kaskel
2013-05-19Merge pull request #1094 from senko/ticket_11160Andrew Godwin
Fixed #11160: Formset non_form_errors returns ErrorList() if is_valid is not called
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-18Fixed #11160 - Ensure full_clean is called from non_form_errorsSenko Rasic
Updated FormSet.non_form_errors() to ensure full_clean() has been called before returning the errors.
2013-05-09Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and ↵Luke Plant
added '__all__' shortcut This also updates all dependent functionality, including modelform_factory and modelformset_factory, and the generic views `ModelFormMixin`, `CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-04-16Refs #14567 -- Fixed failing test that wasn't being run.Carl Meyer
2013-04-13Fixed #17840 -- Generalized named placeholders in form error messagesClaude Paroz
Also fixed plural messages for DecimalField.
2013-04-13Fixed #4592: Made CheckboxSelectMultiple more like RadioSelectBaptiste Mispelon
I refactored RadioSelect and CheckboxSelectMultiple to make them inherit from a base class, allowing them to share the behavior of being able to iterate over their subwidgets. Thanks to Matt McClanahan for the initial patch and to Claude Paroz for the review.
2013-04-13Fixed #4117: Apply id attribute to the outer <ul> of RadioSelectBaptiste Mispelon
2013-04-13Fixed #19874: Apply id attribute to the outer <ul> of CheckboxSelectMultipleBaptiste Mispelon
2013-04-12Modified forms_tests to work with unittest2 discovery.Preston Timmons
2013-04-12Fixed #20211: Document backwards-incompatible change in BoundField.label_tagBaptiste Mispelon
Also cleaned up label escaping and consolidated the test suite regarding label_tag.
2013-04-02Move last remaining tests out of models.py files; prep for test discovery.Preston Timmons
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-21Fixed #20084 -- Provided option to validate formset max_num on server.Andrew Gorcester
This is provided as a new "validate_max" formset_factory option defaulting to False, since the non-validating behavior of max_num is longstanding, and there is certainly code relying on it. (In fact, even the Django admin relies on it for the case where there are more existing inlines than the given max_num). It may be that at some point we want to deprecate validate_max=False and eventually remove the option, but this commit takes no steps in that direction. This also fixes the DoS-prevention absolute_max enforcement so that it causes a form validation error rather than an IndexError, and ensures that absolute_max is always 1000 more than max_num, to prevent surprising changes in behavior with max_num close to absolute_max. Lastly, this commit fixes the previous inconsistency between a regular formset and a model formset in the precedence of max_num and initial data. Previously in a regular formset, if the provided initial data was longer than max_num, it was truncated; in a model formset, all initial forms would be displayed regardless of max_num. Now regular formsets are the same as model formsets; all initial forms are displayed, even if more than max_num. (But if validate_max is True, submitting these forms will result in a "too many forms" validation error!) This combination of behaviors was chosen to keep the max_num validation simple and consistent, and avoid silent data loss due to truncation of initial data. Thanks to Preston for discussion of the design choices.
2013-03-20Fixed #18839 - Field.__init__() now calls super().Carny Cheng
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-11Removed forced settings in runtestsClaude Paroz
Tests that require USE_I18N, LOGIN_URL or certain MIDDLEWARE_CLASSES should be decorated appropriately.
2013-03-08Fixed a regression in forms changed_dataClaude Paroz
Thanks Loic Bistuer for spotting the regression and the initial patch. Refs #16612.
2013-03-07Fixed #19997 -- Added custom EMPTY_VALUES to form fieldsClaude Paroz
Thanks Loic Bistuer for the report and the patch.
2013-03-06Fixed minor warnings in tests.Loic Bistuer
2013-03-02Fixed #19917 -- Added microseconds in default TIME_INPUT_FORMATSClaude Paroz
Thanks minddust for the report.
2013-03-01Fixed #16612 -- Improved has_changed detection for localized field valuesClaude Paroz
Thanks Simon Charette for the review.
2013-02-26Renamed a template to be found by the loaders.Florian Apolloner
2013-02-26Renamed some tests and removed references to modeltests/regressiontests.Florian Apolloner