summaryrefslogtreecommitdiff
path: root/django/forms
AgeCommit message (Collapse)Author
2010-08-09[soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflictsarchive/soc2010/query-refactorAlex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-23Fixed #13592 -- Make sure the SelectDateWidget works with dates before 1900 ↵Jannis Leidel
when localization is enabled. Thanks for the report and patch, magnus. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13301 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-21Fixed #13560 -- Fixed localization of widgets.Jannis Leidel
Particularly this fixes the SplitDateTimeField and the AdminDateWidget by localizating the widget's value in its render method instead of the form field. Thanks to David Danier for the report and Russell for help with the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13296 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-05-03Fixed Python2.4 incompatibility introduced in r13041: datetime.strptime ↵Karen Tracey
classmethod was added in 2.5. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28Fixed #12986 -- Ensured that SelectDateField repopulates correctly when ↵Russell Keith-Magee
USE_L10N=True and locale has a default date input format other than %Y-%m-%d. Thanks to wim@go2people.nl for the report, and walteralini for his draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28Fixed #13431 -- Corrected a unicode literal in select widgets. Thanks to ↵Russell Keith-Magee
gutworth for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27Fixed #12749 -- Corrected a problem with validation of inline primary keys. ↵Russell Keith-Magee
Thanks to Chris.Wesseling@cwi.nl for the report, and nessita for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27Fixed #13407 -- Corrected verbose names for autogenerated m2m models, and ↵Russell Keith-Magee
cleaned up the default form prefix when an autogenerated m2m through model is used in a formset. Thanks to carljm for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31Restored pre-r10062 behavior allowing None from formfield_callback to ↵Brian Rosner
exclude itself from the form git-svn-id: http://code.djangoproject.com/svn/django/trunk@12891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27Fixed #13023 - Removed ambiguity with regard to the max_num option of ↵Jannis Leidel
formsets and as a result of admin inlines. Thanks to Gabriel Hurley for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27Fixed #13032 - Added localize parameter to form fields to be able to ↵Jannis Leidel
selectively enable localization. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-18Fixed #13138: Ensure required=False on a model form field overrides Karen Tracey
blank=False on the underlying model field during model form clean, in order to maintain backward compatibility. Thanks to saxon75 for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16Fixed #12881: Corrected handling of inherited unique constraints. Thanks for ↵Karen Tracey
report fgaudin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16Fixed #12434: Made pretty_name handle empty string and None as input. Thanks ↵Karen Tracey
ales_zoulek and gabrielhurley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12Fixed #11801 -- Corrected form validation to ensure you can still get ↵Russell Keith-Magee
deleted_forms and ordered_forms when a form that is being deleted doesn't validate. Thanks to dantallis for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12771 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-09Fixed #12048 - MultiWidget does not define `__deepcopy__`Luke Plant
Thanks to powderflask for report, test case and initial patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@12739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08Fixed #11183 - BaseForm init leaves pointers pointing back to base_fieldsLuke Plant
Thanks to margieroginski for the report git-svn-id: http://code.djangoproject.com/svn/django/trunk@12733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-07Fixed #12858. DateTime related widgets now handle custom formats properly in ↵Joseph Kocherhans
_has_changed. Thanks for the initial patch, camillo. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-06Fixed #12960. The return value of ModelForm.clean() is now applied to the ↵Joseph Kocherhans
model. Thanks for the report, krejcik. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-03Expanded the fix in [12663] to cover CSS declarations, which were also ↵James Bennett
affected by the bug. Refs #12879. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-03Fixed #12879: Declaring the same JS file multiple times in a single Media ↵James Bennett
instance now only includes that file once. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-01Fixed #12779 - Sanitize numeric form field input according to decimal and ↵Jannis Leidel
thousand separator settings. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-25Fixed #12901. Again. Model validation will not be performed on excluded ↵Joseph Kocherhans
fields that were overridden in the form. Thanks, ammarr. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #9336. Changed CheckboxInput to render 'True' and 'False' input ↵Joseph Kocherhans
strings as checked or not instead of as a value attribute. Thanks, bthomas. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #12878. Formset-wide errors are now rendered properly as html.Joseph Kocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #12420. Now that OneToOneField allows assignment of None, stop ↵Joseph Kocherhans
guarding against it in ModelForms. Thanks, andrewsk. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed a few more spots related to #11859. Thanks, cramm and Alex Gaynor.Joseph Kocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #12285. ModelForm raises a more informative error if it doesn't have a ↵Joseph Kocherhans
model class defined. Thanks, tobias. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #11860. Changed NullBooleanSelect's _has_changed method to repect ↵Joseph Kocherhans
differences between None and False. Thanks, matiasb. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22Fixed #12901. Exclude overridden form fields from model field validation. ↵Joseph Kocherhans
Thanks, Honza Král. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12496 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-14Fixed #6054: work around PIL's installation brokeness by detecting either of ↵Jacob Kaplan-Moss
the two ways it can end up being installed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-10Fixed #12698. Model.clean() used with a ModelForm no longer causes a ↵Joseph Kocherhans
KeyError when raising a ValidationError. Note that previously it was possible to raise a ValidationError in the same place with a message_dict attribute. That behavior was a bug and will no longer have the same behavior. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01Fixed #12692 - Properly handle the extra clause of admin inline formsets. ↵Jannis Leidel
Also fixes #12703, second error. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26Fixed #12508 - Added ability to dynamically add inlines in the admin app.Jannis Leidel
Refs #13. Also introduces an ``empty_form`` attribute on formsets to make it easier to implement dynamic forms. Many thanks to Zain Memon for the initial patch from his Summer of Code 2009 project, Stanislaus Madueke for his django-dynamic-formset app and all the other people helping out. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-21Fixed #12596. Calling super from a ModelForm's clean method is once again ↵Joseph Kocherhans
optional. Failing to call super only skips unique validation as documented. Thanks for the initial patch and tests, carljm. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12Fixed #12510. Changed ModelChoiceField to stop using some of its ↵Joseph Kocherhans
superclasses implementation. This could cause more than one query when generating choices. Thanks, Petr Marhoun and Honza Kral. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12Fixed #12512. Changed ModelForm to stop performing model validation on ↵Joseph Kocherhans
fields that are not part of the form. Thanks, Honza Kral and Ivan Sagalaev. This reverts some admin and test changes from [12098] and also fixes #12507, #12520, #12552 and #12553. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Fixed #9223 -- Added support for declarative widgets to ModelForm. I declare ↵Adrian Holovaty
thanks to isagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty
old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09Fixed #12466 - Set HTML class attributes for each field separately. Thanks ↵Jannis Leidel
for the patch, Bernd Schlapsi. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09Fixed #11301 - Properly hide SplitHiddenDateTimeWidget. Thanks to David ↵Jannis Leidel
Gouldin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09Fixed #11843 - Give MultipleHiddenInput different IDs. Thanks Chris Beaven.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12151 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
2010-01-05Fixed deprecation warning nuisance introduced in r11964. Thanks to Luke ↵Jannis Leidel
Plant for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-30Fixed #12444 - Date based widgets now correctly handle input values when ↵Jannis Leidel
using locale-aware formatting. Also fixes #7656. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #7980 - Improved i18n framework to support locale aware formatting ↵Jannis Leidel
(dates and numbers) and form processing. Thanks to Marc Garcia for working on this during his Google Summer of Code 2009! Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17Fixed #11753 - Q objects with callables no longer explode on Python 2.4. ↵Jacob Kaplan-Moss
Thanks, Jeremy Dunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37