Commit Graph

17 Commits

Author SHA1 Message Date
Russell Keith-Magee aa93f8c2f0 Fixed #13613 -- Ensure that forms.URLField and forms.EmailField are used on a modelform. This ensures that fields are URL and Email fields are cleaned consistently when included on model forms. Thanks to amadison for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05 03:59:20 +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 90616a77f0 Removed a stray print from [12690]. Thanks for catching that, apollo13.
Just running up the commit count in less destructive ways than jacob. Move along.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-06 19:01:47 +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
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 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 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
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
Karen Tracey 125403ca97 Fixed #12215: Added len to ModelChoiceIterator. Thanks Alex and Tobias.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13 17:46:52 +00:00
Karen Tracey 8c8625bde3 Fixed #11149 -- Don't call save_form_data on file-type fields multiple times when saving a model form.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-19 23:13:33 +00:00
Matt Boersma 523da3801d Fixed test suite on Oracle that was broken by using keyword "date" as a field name. Refs #4140 and #10422.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 14:48:04 +00:00
Russell Keith-Magee fbf5eaac94 Fixed #10349 -- Modified ManyToManyFields to allow initial form values to be callables. Thanks to fas for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02 07:03:33 +00:00
Jacob Kaplan-Moss 41260fb931 Fixed #10156: `ModelMultipleChoiceField.clean` now does a single query instead of O(N). Thanks, Alex Gaynor. Also, I ported a few more doctests to unittests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10582 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 15:51:11 +00:00
Malcolm Tredinnick 3bd384aa62 Fixed #10645 -- Added some robustness around some admin and modelform params.
Fieldset dictionary names, search fields and unique_together attribute
names all have to be convertible to strings (that has always been true).
If somebody passes in a unicode object, Python barfs because Django uses
those values as keyword argument names and function calls require
parameter names to be str objects. We now convert thing to strs
automatically.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 07:41:59 +00:00
Jacob Kaplan-Moss 28f6b71623 Fixed the test from [10447] to not depend on `os.listdir()` ordering. I always forget about that one; thanks, buildbot.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 19:41:18 +00:00
Jacob Kaplan-Moss a64a61bf4a Fixed #8422: FilePathField now respects required=False.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 18:53:55 +00:00
Malcolm Tredinnick 7e7a370e20 Fixed #9319 -- Fixed a crash when using the same model field in multiple
unique_together constraints.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 10:09:44 +00:00