summaryrefslogtreecommitdiff
path: root/tests/modeltests/model_formsets/models.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
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.
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
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-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
2008-07-27Changed one of the model_formsets tests to be immune to the differences in theMalcolm Tredinnick
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-26Added an ordering definition to make test output reliable across database ↵Russell Keith-Magee
backends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23Added the ability to customize the prefix value on an inline formset. Fixes ↵Brian Rosner
#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-23Made the semi-private _max_form_count live on the public API of formsets by ↵Brian Rosner
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-19Fixed #7741: django.newforms is now django.forms. This is obviously a ↵Jacob Kaplan-Moss
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-18Merged the newforms-admin branch into trunk.Brian Rosner
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