Russell Keith-Magee
f259494f82
Fixed #9493 -- Corrected error handling of formsets that violate unique constraints across the component forms. Thanks to Alex Gaynor for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 12:17:52 +00:00
Jacob Kaplan-Moss
ccc8e104ee
Fixed #10799 : fixed the use of list_editable with model inheritance and custom one-to-one parent links. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 21:03:29 +00:00
Karen Tracey
bb31cf37ff
Replace test use of assertTrue with failUnless. No matter how many times we try, Python 2.3 still doesn't recognize assertTrue.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 17:51:35 +00:00
Joseph Kocherhans
dc832d7753
Fixed some silly assumptions about pk's that broke the test suite under postgresql.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 22:16:34 +00:00
Joseph Kocherhans
15becf23a9
Forms in model formsets and inline formsets can now be deleted even if they don't validate. Related to #9587 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 19:55:20 +00:00
Joseph Kocherhans
9face54bb7
Fixed #9284 . Fixed #8813 . BaseModelFormSet now calls ModelForm.save().
...
This is backwards-incompatible if you were doing things to 'initial' in BaseModelFormSet.__init__, or if you relied on the internal _total_form_count or _initial_form_count attributes of BaseFormSet. Those attributes are now public methods.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 15:58:52 +00:00
Karen Tracey
81ae2afdec
Fixed 10075: Allowed saving of inline-edited models that use multi-table inheritance.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03 14:02:09 +00:00
Karen Tracey
ca33f07e2c
Fixed #9865 -- Allow saving of new inline-edited objects with custom non-auto primary key fields that are not the foreign key to the parent object.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-21 04:56:32 +00:00
Brian Rosner
83af0b8ff3
Fixed #9494 -- Ensure the foreign key in an inline formset is always present on the forms. Thanks Fugazi for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-01 22:25:41 +00:00
Brian Rosner
0ea15f5650
Fixed #8882 -- When a foreign key is among the unique_together fields in an inline formset properly handle it.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 22:07:05 +00:00
Brian Rosner
524a44e20b
Fixed #9462 -- Set the instance in an inline formset correctly so that None does not get passed through to the queryset. Thanks tobias and copelco for the ticket.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28 20:01:03 +00:00
Brian Rosner
c1de41f4d2
Fixed #7973 -- Added exclude to BaseModelAdmin to make everything consistent with the form/formset factories. Refs #8071 to make it easier to get at exclude. Thanks julien for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 17:26:24 +00:00
Brian Rosner
7c7ad041b3
Fixed #7975 -- Callable defaults in inline model formsets now work correctly. Based on patch from msaelices. Thanks for your hard work msaelices.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 21:28:32 +00:00
Jacob Kaplan-Moss
ea05e61b2b
Fixed #8209 : `ModelForm`s now validate unique constraints. Alex Gaynor did much of this work, and Brian Rosner helped as well.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 19:08:08 +00:00
Brian Rosner
d511996901
Enforce max_num=1 on inline model formsets that have a unique foreign key to its parent. I snuck in a quick clean up to the inlineformset_factory as well.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 21:14:46 +00:00
Brian Rosner
27f9b96fa0
Fixed handling of primary keys in model formsets. Model formsets should now work nicely with custom primary keys that are OneToOneField, ForeignKey and AutoField. Added tests to handle each of them.
...
Fixes #8241 , #8694 , #8695 and #8719 .
Thanks Karen Tracey, jonloyens, sciyoshi, semenov and magneto for tracking down various parts of this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 09:49:55 +00:00
Brian Rosner
d57d490b76
Fixed #7918 -- Allow the foreign key in an inline to be any where in the parent chain. Thanks sil for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 17:41:40 +00:00
Malcolm Tredinnick
d5f1d6f937
Fixed #8542 -- Made the model_formstests tests from [8528] a little less
...
dependent upon the precise values of auto-created primary key integers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 23:56:39 +00:00
Brian Rosner
82a1d5471c
Fixed #7888 -- Handle model inheritance with model formsets correctly. Thanks bpeschier for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 03:51:25 +00:00
Brian Rosner
af35fb1fbb
Ensure that custom primary keys are always shown on a formset. Refs #7938 . Thanks magneto for discovering this problem.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 20:35:40 +00:00
Brian Rosner
61b335700c
Fixed #8067 -- Replaced dict literals in the model_formsets tests with sorted lists of tuples to ensure compatibilty on different implementations of Python. Thanks Leo Soto for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 20:12:18 +00:00
Malcolm Tredinnick
aee55ce524
Changed one of the model_formsets tests to be immune to the differences in the
...
natural collation ordering used by different databases (normally, this test
would fail on PostgreSQL, but not because the code was incorrect). This is
purely a test tweak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 01:18:18 +00:00
Russell Keith-Magee
eca3c7d3d6
Added an ordering definition to make test output reliable across database backends.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 14:49:39 +00:00
Brian Rosner
3912403550
Added the ability to customize the prefix value on an inline formset. Fixes #7899 . AThanks for the tip Peter of the Norse.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 04:46:31 +00:00
Brian Rosner
9d8f41baac
Made the semi-private _max_form_count live on the public API of formsets by renaming it to max_num. This also removes the ManagementForm use of MAX_COUNT since that usage should just be referenced to the formset's max_num property. Refs #7899 . Thanks Peter of the Norse for straightening me out.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 04:28:52 +00:00
Jacob Kaplan-Moss
46786b4193
Fixed #7741 : django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 01:22:26 +00:00
Brian Rosner
a19ed8aea3
Merged the newforms-admin branch into trunk.
...
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00