Commit Graph

172 Commits

Author SHA1 Message Date
Yosuke Yasuda 269315d81a [1.8.x] Fixed #25108 -- Fixed a test which failed on Pillow 2.9+
Backport of a2b999dfca from master
2015-07-13 14:59:02 -04:00
Tim Graham ae1d663b79 [1.8.x] Renamed RemovedInDjango20Warning to RemovedInDjango110Warning. 2015-06-23 07:22:16 -04:00
Andriy Sokolovskiy 8abe2d0643 [1.8.x] Fixed #24948 -- Fixed crash when uploading bitmap images in forms.ImageField
Backport of cf6ce279c7 from master
2015-06-16 14:38:25 -04:00
Alasdair Nicol c37eb3c870 [1.8.x] Fixed #24714 -- Used more specific assertions than assertEqual in tests.
Backport of eaeea6f947 from master
2015-04-28 09:31:35 -04:00
Alasdair Nicol 5105c1628d [1.8.x] Used assertIsInstance in tests.
Backport of d91321e8be from master
2015-04-27 08:42:52 -04:00
Claude Paroz 70c5031d56 [1.8.x] Adapted form regression test to new translations
Backport of 2112b7d78 from master.
2015-04-01 19:53:11 +02:00
Moritz Sichert 44a05a8a91 [1.8.x] Fixed #24469 -- Refined escaping of Django's form elements in non-Django templates.
Backport of 1f2abf784a from master
2015-03-27 20:01:41 -04:00
Michael Angeletti 278b698794 [1.8.x] Fixed #24391 -- Made BoundField.value() cache callable values.
Backport of 65441bbdb0 from master
2015-02-24 20:05:16 -05:00
Aymeric Augustin fae31f2348 [1.8.x] Guaranteed removal of temporary files during tests.
Dropped the DJANGO_TEST_TEMP_DIR environment variable.

Before this change, proper removal depended on the developer passing
dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions.

Backport of 934400759d from master
2015-02-23 15:26:26 -05:00
Michael Angeletti e13dca859c [1.8.x] Added missing return value to DurationField.prepare_value(); refs #24339.
Backport of 49647bec6e from master
2015-02-14 18:39:17 -05:00
Michael Angeletti 2e6d8e51db [1.8.x] Fixed #24339 -- Fixed crash with empty DurationField form field.
Backport of 8a21d25033 from master
2015-02-14 07:38:20 -05:00
Tim Graham a8b70d251d [1.8.x] Sorted imports with isort; refs #23860.
Backport of 0ed7d15563 from master
2015-02-09 14:24:06 -05:00
Adam Taylor 45aaced91e [1.8.x] Fixed typos in code comments.
Backport of 039465a6a7 from master
2015-01-20 12:18:29 -05:00
Yang Liu 3f9ec12d9c Fixed #23712 -- Fixed KeyError with BaseForm._html_output() 2015-01-15 20:19:53 -05:00
Danilo Bargen 2e65d56156 Fixed #20003 -- Improved and extended URLValidator
This adds support for authentication data (`user:password`) in URLs,
IPv6 addresses, and unicode domains.

The test suite has been improved by adding test URLs from
http://mathiasbynens.be/demo/url-regex (with a few adjustments,
like allowing local and reserved IPs).

The previous URL validation regex failed this test suite on 13
occasions, the validator was updated based on
https://gist.github.com/dperini/729294.
2015-01-06 14:04:25 -05:00
Tim Graham 40a8504357 Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.
Thanks Markus Holtermann for review.
2015-01-01 13:30:52 -05:00
Andrey Maslov 7a878ca5cb Fixed #24008 -- Fixed ValidationError crash with list of dicts. 2014-12-31 14:43:13 -05:00
Tim Graham 8a9b0c15a6 Renamed tests for util -> utils moves; refs #17627. 2014-12-31 11:26:27 -05:00
Claude Paroz 51890ce889 Applied ignore_warnings to Django tests 2014-12-30 18:16:25 +01:00
Marc Tamlyn 57554442fe Fixed #2443 -- Added DurationField.
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.

Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.

Thanks to Tim and Josh in particular for reviews.
2014-12-20 18:28:29 +00:00
Grzegorz Slusarek 0dea81cd6d Fixed #23674 -- Fixed a crash when a MultiValueField has invalid data. 2014-12-12 08:47:21 -05:00
Berker Peksag 560b4207b1 Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Tim Heap 5b17dcd8ef Fixed #23883 -- Stopped flatatt modifying its argument 2014-11-21 09:45:08 +01:00
Aymeric Augustin b69b4008d1 Removed usage of a global variable. 2014-11-19 21:35:40 +01:00
Peter Inglesby 74e1980cf9 Fixed #13181 -- Added support for callable choices to forms.ChoiceField
Thanks vanschelven and expleo for the initial patch.
2014-11-04 11:23:58 -05:00
Berker Peksag f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Loic Bistuer ec2fd02bb3 Fixed #23594 -- Fixed deepcopy on ErrorList.
Thanks Troy Grosfield for the report and Tim Graham for the tests.
2014-10-07 00:09:55 +07:00
Marc Tamlyn ed7821231b Fixed #19463 -- Added UUIDField
Uses native support in postgres, and char(32) on other backends.
2014-09-16 10:08:09 +01:00
Vlastimil Zíma e622caaa85 Fixed #21201 -- Improved customization of ClearableFileInput. 2014-08-29 09:40:08 -04:00
Tim Graham f9c7732e96 Tweaked docstrings from previous commit. 2014-08-22 15:57:15 -04:00
areski a6691e5dcf Fixed #23167 -- Added BaseForm.__repr__()
Thanks Keryn Knight for the idea.
2014-08-22 15:55:56 -04:00
Gabriel Muñumel deed00c0d8 Fixed #23162 -- Renamed forms.Field._has_changed() to has_changed(). 2014-08-15 08:14:45 -04:00
Tim Graham 6e77acc589 Fixed flake8 warning. 2014-08-03 14:21:45 -04:00
Tim Graham 0f2ceee025 Fixed #23151 -- Deprecated RegexField.error_message.
Thanks Baptiste Mispelon for the suggestion.
2014-08-03 11:21:01 -04:00
Petras Zdanavičius 8b7347220f Fixed #23103 -- Annotated ImageField file with image and content_type attributes.
Thanks Jeremy Dunck for the suggestion and Nick Sanford for review.
2014-08-01 09:30:58 -04:00
Kit La Touche 17e75d03f9 Fixed #23129 -- Added 'true' and 'false' to `NullBooleanField`.
JavaScript serializations of forms will sometimes render the boolean
values as the strings 'true' and 'false', in lower case. Rather than
repeat boilerplate in the JavaScript to circumvent this, it seems
reasonable to allow Django to understand the lower-case versions of the
booleans.
2014-07-29 19:55:55 -04:00
Simon Charette 80708ac772 Fixed #23113 -- ChoiceInput.render should take specified attrs into account.
Thanks to Tim Graham for the review.
2014-07-28 10:01:07 -04:00
Anubhav Joshi 5cdb8f8c1e Fixed #16617 -- Added 'value' to BaseValidator params.
Also allowed overriding the default messages in subclasses of BaseValidator.

Thanks sperrygrove for initial patch.
2014-07-26 10:03:00 -04:00
Anubhav Joshi 011abb7d96 Fixed #19671 -- Added warnings that null and validators are ignored for ManyToManyField.
Thanks Loic Bistuer and Tim Graham for help and review.
2014-07-09 16:01:09 -04:00
Claude Paroz dd9a23d5cf Fixed #22950 -- Eased markup customization for choice field rendering
Thanks Patrick Robertson for the report.
2014-07-05 13:36:49 +02:00
Claude Paroz 9209049211 Ensured bound field renders as unicode safe data
Refs #22950.
2014-07-05 11:42:27 +02:00
Loic Bistuer 1966054feb Fixed #22915 -- Document backward incompatible changes in the ValidationError constructor.
This patch also fixes update_error_dict to better handle the use case described
in this ticket, previously the type of the provided container could be lost in
some conditions.

Thanks Russell Keith-Magee for the report and Tim Graham for review.
2014-07-04 17:05:31 +07:00
gyx1000 7e2c87809c Fixed #22684 -- Amended SelectDateWidget.empty_label to accept a tuple of values.
Thanks danielsamuels for the report
2014-06-04 07:23:25 -04:00
Nick Presta 11f0899bbe Fixed #11776 -- Added CSS class for non-field/top of form errors.
Thanks Daniel Pope for the suggestion.
2014-06-02 15:22:15 -04:00
Alex Gaynor 1dcc603eff Fixed several typos in Django 2014-05-28 17:39:14 -07:00
Guillaume Pannatier 32586b0ba4 Fixed #22684 -- Added `empty_label` option on `django.forms.extras.widets.SelectDateWidget`
Thanks danielsamuels for the report
2014-05-28 13:23:28 -04:00
Florian Apolloner ee51ab9d23 Restored Python 2 compatibility. 2014-05-26 00:07:15 +02:00
Florian Apolloner 536ebaa048 Fixed a few warnings in the testsuite. 2014-05-25 23:14:50 +02:00
Stephen Burrows d64f192df1 Fixed #22628 -- Took initial forms into account when combining FormSet.min_num and FormSet.extra.
Forwardport of 79f15ab1ef from stable/1.7.x
2014-05-16 06:38:24 -04:00
Julen Ruiz Aizpuru 5eb81ce445 Fixed #22533 -- Added label_suffix parameter to form fields.
Fields can now receive the `label_suffix` attribute, which will override
a form's `label_suffix`.

This enhances the possibility to customize form's `label_suffix`, allowing
to use such customizations while using shortcuts such as
`{{ form.as_p }}`.

Note that the field's own customization can be overridden at runtime by
using the `label_prefix` parameter to `BoundField.label_tag()`.

Refs #18134.
2014-05-13 09:09:33 -04:00