summaryrefslogtreecommitdiff
path: root/tests/modeltests/model_formsets
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2013-02-23Fixed #19686 -- Added HTML5 number input typeClaude Paroz
Thanks Simon Charette for his help on the patch. Refs #16630.
2013-02-08Fixed #18906 -- Ignored to-be-deleted forms in formset validate_uniqueClaude Paroz
Thanks c.pollock at bangor.ac.uk for the report.
2013-01-24Fixed #17416 -- Added widgets argument to inlineformset_factory and ↵Nick Sandford
modelformset_factory
2012-08-12[py3] Refactored __unicode__ to __str__.Aymeric Augustin
* Renamed the __unicode__ methods * Applied the python_2_unicode_compatible decorator * Removed the StrAndUnicode mix-in that is superseded by python_2_unicode_compatible * Kept the __unicode__ methods in classes that specifically test it under Python 2
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-01-31Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and ↵Carl Meyer
converted Django tests to use them where appropriate. Thanks Greg Müllegger. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert all modeltests to use absolute imports, rather than relative ones.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30Fixed #8160 -- Made sure `modelformset_factory` takes in account `fields' ↵Ramiro Morales
and `exclude` ModelForm options. Thanks Andrew McMurry for the report and Claude Paroz for creating these tests. (Actually, this had been fixed in r10619 but the tests added then exercise the code in the context of ModelAdmin. This commit adds more generic tests.) git-svn-id: http://code.djangoproject.com/svn/django/trunk@16918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-09Fixed a number of tests that were failing in Oracle due to false assumptions ↵Ian Kelly
about the primary keys of objects. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-08Added a skip for a test that fails in Oracle. Unlike other backends, Oracle ↵Ian Kelly
does not allow duplicate rows where there is a unique_together constraint for which some but not all of the columns are NULL. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05Modified wrong expected model formset output in a couple of additional tests ↵Ramiro Morales
after fix introduced in [15424]. Refs #15167. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15430 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04Removed all usages of deprecated TestCase methods (self.fail*). This ↵Alex Gaynor
removed most of the Warnings emitted (with -Wall) during the test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17Migrated model_formsets doctests. Thanks to Gregor Müllegger for the patch.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13Fixed #13811 -- Changed unique validation in model formsets to ignore None ↵Honza Král
values, not just omit them git-svn-id: http://code.djangoproject.com/svn/django/trunk@14193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-12Fixed #13524 -- Added backwards compatibility and feature notes regarding ↵Russell Keith-Magee
admin inlines and formsets. Thanks to Ramiro Morales and Gabriel Hurley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13241 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-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-08Fixed #11940 - ModelForm evaluates callable default values on form class ↵Luke Plant
creation Thanks to Harm Geerts for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12721 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-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-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
2009-12-22Tweaked the model_formsets test to work around a weird sorting problem ↵Russell Keith-Magee
between versions of Postgres. Thanks to Alex Gaynor for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16Cleaned up some stray text in the test from r11874. Thanks to Rob Hudson for ↵Russell Keith-Magee
the eagle eyes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16Fixed #10263 -- Added a queryset argument to BaseInlineFormSet, normalizing ↵Russell Keith-Magee
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-12Fixed #11632: Fixed a test broken by r11826 that relied on the exact ↵Karen Tracey
(invalid HTML) id of an initial hidden input field. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07Fixed #9493 -- Corrected error handling of formsets that violate unique ↵Russell Keith-Magee
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-04-18Fixed #10799: fixed the use of list_editable with model inheritance and ↵Jacob Kaplan-Moss
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-04Replace test use of assertTrue with failUnless. No matter how many times we ↵Karen Tracey
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-01Fixed some silly assumptions about pk's that broke the test suite under ↵Joseph Kocherhans
postgresql. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Forms in model formsets and inline formsets can now be deleted even if they ↵Joseph Kocherhans
don't validate. Related to #9587. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #9284. Fixed #8813. BaseModelFormSet now calls ModelForm.save().Joseph Kocherhans
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-02-03Fixed 10075: Allowed saving of inline-edited models that use multi-table ↵Karen Tracey
inheritance. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-21Fixed #9865 -- Allow saving of new inline-edited objects with custom ↵Karen Tracey
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-11-01Fixed #9494 -- Ensure the foreign key in an inline formset is always present ↵Brian Rosner
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-10-31Fixed #8882 -- When a foreign key is among the unique_together fields in an ↵Brian Rosner
inline formset properly handle it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28Fixed #9462 -- Set the instance in an inline formset correctly so that None ↵Brian Rosner
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-09-02Fixed #7973 -- Added exclude to BaseModelAdmin to make everything consistent ↵Brian Rosner
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-01Fixed #7975 -- Callable defaults in inline model formsets now work ↵Brian Rosner
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-01Fixed #8209: `ModelForm`s now validate unique constraints. Alex Gaynor did ↵Jacob Kaplan-Moss
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-08-31Enforce max_num=1 on inline model formsets that have a unique foreign key to ↵Brian Rosner
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-31Fixed handling of primary keys in model formsets. Model formsets should now ↵Brian Rosner
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-29Fixed #7918 -- Allow the foreign key in an inline to be any where in the ↵Brian Rosner
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-25Fixed #8542 -- Made the model_formstests tests from [8528] a little lessMalcolm Tredinnick
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-25Fixed #7888 -- Handle model inheritance with model formsets correctly. ↵Brian Rosner
Thanks bpeschier for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01Ensure that custom primary keys are always shown on a formset. Refs #7938. ↵Brian Rosner
Thanks magneto for discovering this problem. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01Fixed #8067 -- Replaced dict literals in the model_formsets tests with ↵Brian Rosner
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