Jannis Leidel
e6ec07dc1f
Fixed #13592 -- Make sure the SelectDateWidget works with dates before 1900 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-23 10:38:23 +00:00
Jannis Leidel
b057a8b247
Fixed #13560 -- Fixed localization of widgets.
...
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-21 14:07:54 +00:00
Russell Keith-Magee
5211f48ae3
Fixed #12164 -- Removed the Python 2.3 compatibility imports and 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-04 14:00:30 +00:00
Karen Tracey
7fc25715d6
Fixed Python2.4 incompatibility introduced in r13041: datetime.strptime classmethod was added in 2.5.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-03 15:30:11 +00:00
Russell Keith-Magee
5926a26e92
Fixed #12986 -- Ensured that SelectDateField repopulates correctly when 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-28 15:39:26 +00:00
Russell Keith-Magee
2ebf7fb2b2
Fixed #13431 -- Corrected a unicode literal in select widgets. Thanks to gutworth for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28 03:02:53 +00:00
Russell Keith-Magee
dd07c23545
Fixed #12749 -- Corrected a problem with validation of inline primary keys. 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-27 15:05:38 +00:00
Russell Keith-Magee
2f9eef1227
Fixed #13407 -- Corrected verbose names for autogenerated m2m models, and 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-04-27 12:35:49 +00:00
Brian Rosner
e58c75fbdf
Restored pre-r10062 behavior allowing None from formfield_callback to exclude itself from the form
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31 07:43:52 +00:00
Jannis Leidel
aba95dcc0b
Fixed #13023 - Removed ambiguity with regard to the max_num option of 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-27 23:03:56 +00:00
Jannis Leidel
ca4c6f65ea
Fixed #13032 - Added localize parameter to form fields to be able to selectively enable localization.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 16:43:27 +00:00
Karen Tracey
7471dab660
Fixed #13138 : Ensure required=False on a model form field overrides
...
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-18 02:03:07 +00:00
Karen Tracey
47a822207f
Fixed #12881 : Corrected handling of inherited unique constraints. Thanks for report fgaudin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16 19:32:11 +00:00
Karen Tracey
cc6e9b2286
Fixed #12434 : Made pretty_name handle empty string and None as input. Thanks ales_zoulek and gabrielhurley.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16 16:10:27 +00:00
Russell Keith-Magee
4120a181e9
Fixed #11801 -- Corrected form validation to ensure you can still get 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-12 15:51:00 +00:00
Luke Plant
e316b8b981
Fixed #12048 - MultiWidget does not define `__deepcopy__`
...
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-09 22:52:04 +00:00
Luke Plant
48cd8e856f
Fixed #11183 - BaseForm init leaves pointers pointing back to base_fields
...
Thanks to margieroginski for the report
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08 23:55:04 +00:00
Joseph Kocherhans
5beb5f7372
Fixed #12858 . DateTime related widgets now handle custom formats properly in _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-07 03:33:07 +00:00
Joseph Kocherhans
b88f969789
Fixed #12960 . The return value of ModelForm.clean() is now applied to the model. Thanks for the report, krejcik.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-06 18:42:56 +00:00
James Bennett
6edcd11aed
Expanded the fix in [12663] to cover CSS declarations, which were also affected by the bug. Refs #12879 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-03 08:17:51 +00:00
James Bennett
9a82ca0a36
Fixed #12879 : Declaring the same JS file multiple times in a single Media 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-03 08:01:48 +00:00
Jannis Leidel
0d2a24fd42
Fixed #12779 - Sanitize numeric form field input according to decimal and thousand separator settings.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-01 10:19:24 +00:00
Joseph Kocherhans
e488c1dc0d
Fixed #12901 . Again. Model validation will not be performed on excluded 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-25 17:18:27 +00:00
Joseph Kocherhans
445e0a5c3e
Fixed #9336 . Changed CheckboxInput to render 'True' and 'False' input 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-23 23:37:45 +00:00
Joseph Kocherhans
ea3853e8d2
Fixed #12878 . Formset-wide errors are now rendered properly as html.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 20:55:42 +00:00
Joseph Kocherhans
6ba5fb3728
Fixed #12420 . Now that OneToOneField allows assignment of None, stop 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-23 20:02:18 +00:00
Joseph Kocherhans
7352238e16
Fixed a few more spots related to #11859 . Thanks, cramm and Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 18:27:51 +00:00
Joseph Kocherhans
8da76ffeaa
Fixed #12285 . ModelForm raises a more informative error if it doesn't have a model class defined. Thanks, tobias.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 14:59:30 +00:00
Joseph Kocherhans
871a99c948
Fixed #11860 . Changed NullBooleanSelect's _has_changed method to repect 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-23 14:17:42 +00:00
Joseph Kocherhans
eb0751a4c0
Fixed #12901 . Exclude overridden form fields from model field validation. Thanks, Honza Král.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22 23:06:09 +00:00
Russell Keith-Magee
692fd7da5e
Fixed #7777 -- Added validation handling for NaN, Inf and -Inf in 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-22 14:38:44 +00:00
Jacob Kaplan-Moss
7578981626
Fixed #6054 : work around PIL's installation brokeness by detecting either of 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-14 18:28:28 +00:00
Joseph Kocherhans
8f4540b2e6
Fixed #12698 . Model.clean() used with a ModelForm no longer causes a 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-10 00:34:45 +00:00
Jannis Leidel
9555f2be9d
Fixed #12692 - Properly handle the extra clause of admin inline formsets. Also fixes #12703 , second error.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:14:56 +00:00
Jannis Leidel
c14937cf7a
Fixed #12508 - Added ability to dynamically add inlines in the admin app.
...
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-26 15:02:53 +00:00
Joseph Kocherhans
408d431029
Fixed #12596 . Calling super from a ModelForm's clean method is once again 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-21 02:28:03 +00:00
Joseph Kocherhans
223b2721aa
Fixed #12510 . Changed ModelChoiceField to stop using some of its 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-12 14:58:24 +00:00
Joseph Kocherhans
2f9853b2dc
Fixed #12512 . Changed ModelForm to stop performing model validation on 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-12 02:29:45 +00:00
Adrian Holovaty
9bb1fa7251
Fixed #9223 -- Added support for declarative widgets to ModelForm. I declare thanks to isagalaev.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 19:23:42 +00:00
Adrian Holovaty
5ceed0a053
Changed a whole bunch of places to raise exception instances instead of 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-10 18:36:20 +00:00
Jannis Leidel
5e83b79d26
Fixed #12466 - Set HTML class attributes for each field separately. Thanks for the patch, Bernd Schlapsi.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 22:51:03 +00:00
Jannis Leidel
4700200383
Fixed #11301 - Properly hide SplitHiddenDateTimeWidget. Thanks to David Gouldin for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 22:34:13 +00:00
Jannis Leidel
341c85bed0
Fixed #11843 - Give MultipleHiddenInput different IDs. Thanks Chris Beaven.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 22:14:01 +00:00
Joseph Kocherhans
471596fc1a
Merged soc2009/model-validation to trunk. Thanks, Honza!
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 03:56:19 +00:00
Jannis Leidel
4e89105d64
Fixed deprecation warning nuisance introduced in r11964. Thanks to Luke Plant for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 02:39:02 +00:00
Jannis Leidel
bf33d3eb1d
Fixed #12444 - Date based widgets now correctly handle input values when 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-30 22:11:48 +00:00
Jannis Leidel
9233d04265
Fixed #7980 - Improved i18n framework to support locale aware formatting (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-22 17:58:49 +00:00
Russell Keith-Magee
ff60c5f9de
Fixed #1142 -- Added multiple database support.
...
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-22 15:18:51 +00:00
Jacob Kaplan-Moss
574eafe4c0
Fixed #11753 - Q objects with callables no longer explode on Python 2.4. Thanks, Jeremy Dunck.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:06:41 +00:00
Russell Keith-Magee
680268a683
Fixed #10263 -- Added a queryset argument to BaseInlineFormSet, normalizing with BaseModelFormSet, and allowing for custom ordering/subsets in inlines. Thanks to Paulo Scardine for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16 14:52:29 +00:00