summaryrefslogtreecommitdiff
path: root/django/forms
AgeCommit message (Collapse)Author
2009-10-09SECURITY ALERT: Corrected regular expressions for URL and email fields.Jacob Kaplan-Moss
Certain email addresses/URLs could trigger a catastrophic backtracking situation, causing 100% CPU and server overload. If deliberately triggered, this could be the basis of a denial-of-service attack. This security vulnerability was disclosed in public, so we're skipping our normal security release process to get the fix out as soon as possible. This is a security related update. A full announcement will follow. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@11605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-29[1.0.X] Fixed a few Python 2.3 incompatibilities that were causing test ↵Gary Wilson Jr
failures. Backport of [10863] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15[1.0.X] Fixed #11120 -- Corrected handling of inlines attached to inherited ↵Russell Keith-Magee
classes, broken by r10756. Thanks to George Song and Michael Strickland for the simultaneous reports. Merge of r10787 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14[1.0.X] Fixed #10992: fixed a bug saving inlines with custom primary key ↵Jacob Kaplan-Moss
fields. Thanks, Zain. Backport of [10777] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14[1.0.X] Fixed a weird intentation glitch in `django/forms/models.py`. Five ↵Jacob Kaplan-Moss
spaces!? git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-13[1.0.X] Fixed #10243, #11043 -- Corrected handling of formsets over a ↵Russell Keith-Magee
ForeignKey that uses to_field, and by extension, fixed the admin for handling fields of that type. Thanks to apollo13 for the initial patch. Merge of r10756 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-13[1.0.X] Fixed #10288 -- Corrected _has_changed handling of DateTimeInput ↵Russell Keith-Magee
when a custom date/time format is in use. Thanks to Koen Biermans for the report and patch. Merge of r10641 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11[1.0.X] Changed r10672 to not falsely error out when using generic inlines.Malcolm Tredinnick
The bug was picked up by the tests already, but only if run against a backend that supports referential integrity. Backport of r10732 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11[1.0.X] Fixed #10792 -- Ensured that ModelChoiceFields don't provide an ↵Russell Keith-Magee
empty option when the underlying field has blank=False and there is a default value available. Thanks to carljm for the report and patch. Merge of r10729 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08[1.0.X] Fixed #9493 -- Corrected error handling of formsets that violate ↵Russell Keith-Magee
unique constraints across the component forms. Thanks to Alex Gaynor for the patch. Merge of r10682 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10718 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. Merge of r10660 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-30[1.0.X] Fixed #10134 -- Added unique_for_[date|day|month|year] validation to ↵Russell Keith-Magee
ModelForm handling. Thanks to Alex Gaynor for the patch. Merge of r10646 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-28[1.0.X] Fixed #10082 -- Modified BaseFormSet so that ordering checks work ↵Russell Keith-Magee
when the formset is empty. Thanks to Petr Marhoun for the report and test case, and bmathieu for the fix. Merge of r10643 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-23[1.0.X] Fixed #10163: add an artificial ordering to querysets used by ↵Jacob Kaplan-Moss
formsets, thus ensuring that POSTed data "lines up" correctly every time. Thanks to Karen Tracey for pointing in the right direction here. This is a backport of [10625] from trunk, in a sense. In 1.1 I added a `QuerySet.ordered` property to deal with the logic of determining whether a queryset has ordering, but we can't add new features on a bugfix branch. So here in 1.0-land, the logic has to live in the formset. This smells, but it's better than having a bug. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22[1.0.X] Fixed #10208: `ModelAdmin` now respects the `exclude` and `field` ↵Jacob Kaplan-Moss
atributes of custom `ModelForm`s. Thanks, Alex Gaynor. Backport of r10619 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-21[1.0.X] Fixed #9651: fixed save_as with inline forms. Thanks, kmike and ↵Karen Tracey
Mnewman. Backport of r10353 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18[1.0.X] Fixed #10002: inline file uploads now correctly display prior data. ↵Jacob Kaplan-Moss
Thanks, dgouldin. Backport of r10588 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18[1.0.X] Fixed #9124: fixed `SelectDateWidget` with `required=False`. Thanks, ↵Jacob Kaplan-Moss
Bernd Schlapsi. Backport of [10584] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10585 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18[1.0.X\ Fixed #10156: `ModelMultipleChoiceField.clean` now does a single ↵Jacob Kaplan-Moss
query instead of O(N). Thanks, Alex Gaynor. Also, I ported a few more doctests to unittests. Backport of r10582 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16[1.0.X] Fixed #9948 -- Corrected URLField validation to match RFC1035 (URL ↵Russell Keith-Magee
analog of #9890). Thanks to kratorius for the report and fix. Merge of r10574 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16[1.0.X] Fixed #9890 -- Modified the regex validation for email addresses to ↵Russell Keith-Magee
match RFC822/1035. Thanks to ozgur for the report, and kratorius for the patch. Merge of 10573 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10[1.0.X] Fixed #10038: make `BaseModelFormSet.save_existing_objects` use ↵Jacob Kaplan-Moss
`Form.has_changed()` instead of looking at `changed_data` directly. Thanks, karihre. Backport of r10495 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10[1.0.X] Fixed #10774: accessing form media types in templates (i.e. ``{{ ↵Jacob Kaplan-Moss
form.media.js }}``) now works. Thanks, tarequeh and Alex Gaynor. Backport of r10489 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08[1.0.X] Fixed #8422: FilePathField now respects required=False. Backport of ↵Jacob Kaplan-Moss
r10447 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01[1.0.X] Fixed #9473: FormWizard now works with NullBooleanFields. As a ↵Jacob Kaplan-Moss
bonus, we now have the beginnings of a test suite for FormWizard. Thanks, Keith Bussell. Backport of r10316 and r10319 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31[1.0.X] Fixed #8746: Check data in raw_id_fields more closely. Thanks, dgouldinJacob Kaplan-Moss
Backport of r10233 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31[1.0.X] Fixed #9863. A ForeignKey with editable=False to the parent in an ↵Joseph Kocherhans
inline no longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch. Backport of r10239 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31[1.0.X] Forms in model formsets and inline formsets can now be deleted even ↵Joseph Kocherhans
if they don't validate. Related to #9587. Backport of r10283 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30[1.0.X] Fixed #10149. FileFields? in a form now validate max_length. Based ↵Joseph Kocherhans
on a patch by Massimo Scamarcia. Backport of r10227 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30[1.0.X] Fixed #9587. Formset.is_valid() now returns True if an invalid form ↵Joseph Kocherhans
is marked for deletion. Backport of r10206 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17[1.0.X] Fixed `BaseFormSet.is_multipart()` so that it doesn't bomb when ↵Jacob Kaplan-Moss
called on an empty formset. Backport of [10073] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10[1.0.X] Fixed #10271, #10281 -- Fixed the handling multiple inline models ↵Russell Keith-Magee
that 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. Backport of r10017 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03Fixed #10075: Allowed saving of inline-edited models that use multi-table ↵Karen Tracey
inheritance. r9809 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-19[1.0.X] Fixed #10069 -- Fixed the model form unique validation code to not ↵Karen Tracey
proceed with using, for example, RelatedObjects returned by get_field_by_name as though they were model Fields. r9777 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23[1.0.X] Fixed #9882 -- Added `alters_data = True` to `BaseModelForm.save` ↵Gary Wilson Jr
method, thanks dc. Backport of r9678 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-21[1.0.X] Fixed #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. r9664 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08[1.0.X] The first step in fixing a group of problems related to outputting aMalcolm Tredinnick
proper "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. Backport of r9601 from trunk (the second piece of this patch is a bugfix, not just a tidy-up. It looks like it might be possible to have to_field setups that make the existing code fail and that's only hidden by the fact that inherited models with to_field relations to the parent fail for other reasons right now). git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-14[1.0.X] Fixed #9076 -- Changed BaseInlineFormSet to not override ↵Karen Tracey
BaseModelFormSet's 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. Thanks bthomas for the initial patch. r9440 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10[1.0.X] Fixed #7064: Made DemicmalField validation support max_digits equal ↵Karen Tracey
to decimal_places. r9387 and r9388 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10[1.0.X] Fixed #6035 -- Gave the SplitDateTimeField the proper default ↵Karen Tracey
widget. Thanks dtulig. r9385 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06[1.0.X] Fixed #6160, #9111 -- Consistently apply conditional_escape to form ↵Karen Tracey
errors and labels when outputing them as HTML. [9365] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-05[1.0.X] Fixed #9218 -- Simplified the fix from #9039 and added tests to ↵Karen Tracey
ensure this case doesn't break again (and that the simplification didn't break anything). [9341] from trunk. Also updated svnmerge metadata. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-04[1.0.X] Fixed #9418 -- When saving a model form, defer saving of file-type ↵Karen Tracey
fields 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. [9334] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-01[1.0.X] Fixed #9494 -- Ensure the foreign key in an inline formset is always ↵Brian Rosner
present on the forms. Thanks Fugazi for the report. Backport of r9326 from trunk git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31[1.0.X] Fixed #8882 -- When a foreign key is among the unique_together ↵Brian Rosner
fields in an inline formset properly handle it. Backport of r9297 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28[0.5.X] Fixed #9462 -- Set the instance in an inline formset correctly so ↵Brian Rosner
that None does not get passed through to the queryset. Thanks tobias and copelco for the ticket. Backport of r9293 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24[1.0.X] Fixed #9384 -- Fixed a couple of typos. Thanks, Thomas Güttler and ↵Malcolm Tredinnick
romke. Backport of r9255 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21[1.0.X] Fixed #9039 -- Don't perform unique checks on NULL values, since ↵Karen Tracey
NULL != NULL in SQL. Backport of [9239] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08[1.0.X] Fixed #9319 -- Fixed a crash when using the same model field in multipleMalcolm Tredinnick
unique_together constraints. Backport of r9208 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-27Fixed #9171 -- Fixed a few places where we were assuming lists instead ofMalcolm Tredinnick
generic sequences in ModelForm structures. Patch from mrmachine. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9086 bcc190cf-cafb-0310-a4f2-bffc1f526a37