summaryrefslogtreecommitdiff
path: root/django/forms
AgeCommit message (Collapse)Author
2009-05-07Fixed #10893 -- Corrected a problem with using list_editable in the admin ↵Russell Keith-Magee
when the model has a manual primary key. Thanks to Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02Fixed #9609 -- Modified the clean method of(Null)Boolean field to accept '1' ↵Russell Keith-Magee
and '0' as valid inputs. Thanks to psagers for the patch. This is required to support the use of non-default form widgets such as RadioSelect when the data comes from MySQL, which uses 1/0 to represent booleans. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-30Fixed #10134 -- Added unique_for_[date|day|month|year] validation to ↵Russell Keith-Magee
ModelForm handling. Thanks to Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-28Fixed #10082 -- Modified BaseFormSet so that ordering checks work when the ↵Russell Keith-Magee
formset is empty. Thanks to Petr Marhoun for the report and test case, and bmathieu for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-28Fixed #10288 -- Corrected _has_changed handling of DateTimeInput, DateInput, ↵Russell Keith-Magee
TimeInput, and SplitDateTimeWidget when a custom date/time format is in use. Thanks to Koen Biermans for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22Fixed #10163: add an artificial ordering to querysets used by formsets, thus ↵Jacob Kaplan-Moss
ensuring that POSTed data "lines up" correctly every time. Thanks to Karen Tracey for pointing in the right direction here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22Fixed #10208: `ModelAdmin` now respects the `exclude` and `field` atributes ↵Jacob Kaplan-Moss
of custom `ModelForm`s. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10619 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-18Fixed #10002: inline file uploads now correctly display prior data. Thanks, ↵Jacob Kaplan-Moss
dgouldin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18Fixed #9124: fixed `SelectDateWidget` with `required=False`. Thanks, Bernd ↵Jacob Kaplan-Moss
Schlapsi. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18Fixed #10156: `ModelMultipleChoiceField.clean` now does a single query ↵Jacob Kaplan-Moss
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-16Fixed #10363 -- Modified ModelForm handling to ensure that excluded fields ↵Russell Keith-Magee
can't be saved onto the model. Thanks to jgoldberg for the report, an Alex Gaynor for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16Fixed #9948 -- Corrected URLField validation to match RFC1035 (URL analog of ↵Russell Keith-Magee
#9890). Thanks to kratorius for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16Fixed #9890 -- Modified the regex validation for email addresses to match ↵Russell Keith-Magee
RFC822/1035. Thanks to ozgur for the report, and kratorius for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11Fixed #10645 -- Added some robustness around some admin and modelform params.Malcolm Tredinnick
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-10Fixed #10038: make `BaseModelFormSet.save_existing_objects` use ↵Jacob Kaplan-Moss
`Form.has_changed()` instead of looking at `changed_data` directly. Thanks, karihre. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10Fixed #10774: accessing form media types in templates (i.e. ``{{ ↵Jacob Kaplan-Moss
form.media.js }}``) now works. Thanks, tarequeh and Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08Fixed #8422: FilePathField now respects required=False.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02Fixed #9651: fixed save_as with inline forms. Thanks, kmike and Mnewman.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed a bug introduced by [10316].Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed #9473: FormWizard now works with NullBooleanFields. As a bonus, we now ↵Jacob Kaplan-Moss
have the beginnings of a test suite for FormWizard. Thanks, Keith Bussell. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10316 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-31Fixed #9863. A ForeignKey with editable=False to the parent in an inline no ↵Joseph Kocherhans
longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #8746: Check data in raw_id_fields more closely. Thanks, dgouldinJacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #10149. FileFields in a form now validate max_length. Based on a patch ↵Joseph Kocherhans
by Massimo Scamarcia. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #9587. Formset.is_valid() now returns True if an invalid form is ↵Joseph Kocherhans
marked for deletion. Thanks for the test and intial patch, kratorius. Note that this leaves the form and formset errors alone. Those forms still have errors, it's just that it doesn't matter that they're invalid in the context of the formset and deletion. Also fixed #9665 while I was in there. Thanks, mark_hildreth. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10206 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-03-22Fixed #8962 -- Consistently support format and input_format in the various ↵Karen Tracey
(individual, combined, split) date and time form fields and widgets. Many thanks to Tai Lee for doing all the work here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17Fixed `BaseFormSet.is_multipart()` so that it doesn't bomb when called on an ↵Jacob Kaplan-Moss
empty formset. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17Fixed #10512 -- Corrected the handling of extra fields on a ModelForm. ↵Russell Keith-Magee
Thanks to Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15Fixed #8164 -- Fields on a ModelForm are now ordered in the order specified ↵Russell Keith-Magee
in the fields attribute of the ModelForm's Meta class. Thanks to Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10Fixed #10271, #10281 -- Fixed the handling multiple inline models that ↵Russell Keith-Magee
share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10017 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
2009-01-19Fixed #10069 -- Fixed the model form unique validation code to not proceed ↵Karen Tracey
with using, for example, RelatedObjects returned by get_field_by_name as though they were model Fields. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23Fixed #9882 -- Added `alters_data = True` to `BaseModelForm.save` method, ↵Gary Wilson Jr
thanks dc. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9678 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-12-08The first step in fixing a group of problems related to outputting a properMalcolm Tredinnick
"value" for a field that is a relation to another model. This part adds the utility method on Model that should help in general.Also cleans up the slightly ugly mess from r8957. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08Edited docs/topics/forms/index.txt changes from [9569] and fixed a typo in ↵Adrian Holovaty
the visible_fields() docstring git-svn-id: http://code.djangoproject.com/svn/django/trunk@9592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-05Added a way to iterate over hidden/visible fields in a form. Useful for manualMalcolm Tredinnick
form layout. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-14Fixed #9076 -- Changed BaseInlineFormSet to not override BaseModelFormSet's ↵Karen Tracey
get_queryset method. BaseInlineFormSet's method did not include a couple of fixes/enhancements that were made to the parent's method, resulting in excessive queries (some of which can return bad data due to #9006) for admin pages with inlines. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #7064: Made DemicmalField validation support max_digits equal to ↵Karen Tracey
decimal_places. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #6035 -- Gave the SplitDateTimeField the proper default widget. ↵Karen Tracey
Thanks dtulig. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06Fixed #6160, #9111 -- Consistently apply conditional_escape to form errors ↵Karen Tracey
and labels when outputing them as HTML. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-05Fixed #9218 -- Simplified the fix from #9039 and added tests to ensure this ↵Karen Tracey
case doesn't break again (and that the simplification didn't break anything). git-svn-id: http://code.djangoproject.com/svn/django/trunk@9341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-04Fixed #9418 -- When saving a model form, defer saving of file-type fields ↵Karen Tracey
until after other fields, so that callable upload_to methods can use data from the other fields. Thanks to Bernd Schlapsi for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9334 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-10-24Fixed #9384 -- Fixed a couple of typos. Thanks, Thomas Güttler and romke.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21Fixed #9039 -- Don't perform unique checks on NULL values, since NULL != ↵Karen Tracey
NULL in SQL. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9239 bcc190cf-cafb-0310-a4f2-bffc1f526a37