Commit Graph

270 Commits

Author SHA1 Message Date
Aymeric Augustin 19e54084dc Fixed #17114 -- Handled integer values 0 and 1 for checkboxes like other integer values, not like False and True.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 10:11:06 +00:00
Aymeric Augustin 9b1cb755a2 Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 13:01:06 +00:00
Julien Phalip a6ccc8cc06 Fixed #15912 -- Ensured that `forms.CharField.widget_attrs()` always returns a dictionary. Thanks to tsabi and rubyruy for the report and to mmcnickle and prestontimmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-15 09:36:08 +00:00
Karen Tracey 0db571b417 Fixed #17134: Corrected Python 2.5 fallback code for parsing microseconds in time values. Thanks aaugustin and jcd.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13 00:43:02 +00:00
Julien Phalip b45099eefb Fixed #17190 -- Ensured that the `NullBooleanSelect` widget's options get lazily localized. Thanks to pennersr for the report and to kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12 23:07:51 +00:00
Julien Phalip 90d3697417 Fixed #17125 -- Made it possible to change a `RegexField`'s regular expression validator after it has been initialized. Thanks to Claude Paroz for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-07 07:41:24 +00:00
Julien Phalip b2948d8179 Fixed #17165 -- Fixed `SelectDateWidget._has_changed()` to work correctly with a localized date format.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-06 00:31:06 +00:00
Carl Meyer 7a718f0f3a Fixed #17127 -- Made field validators list independent per form instance. Thanks claudep for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-28 14:38:41 +00:00
Paul McMillan 67565a5379 Remove comments referencing encryption. Django doesn't do encryption.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 20:28:52 +00:00
Alex Gaynor 396fcaaef9 Remove all relative imports. We have always been at war with relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 00:47:49 +00:00
Alex Gaynor 544a8372fd Remove several more relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 16:56:18 +00:00
Alex Gaynor 1856e398c5 Remove more relative imports (I will kill them all).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 16:39:53 +00:00
Alex Gaynor 87ffc6a6c2 remove some relative imports from django
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 13:15:40 +00:00
Chris Beaven e63fa0ff83 Fixes #8103 -- Select widget should only allow for one selected option
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-18 04:09:44 +00:00
Alex Gaynor d14bf8c62b Fixed #11404. Added ``FormSet.has_changed``, for consistancy with ``Form.has_changed``. Thanks to michelts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 02:42:05 +00:00
Alex Gaynor 01b0eb50fd Make ``Formset.__getitem__`` O(1), rather than O(n). If you override ``__iter__`` you now need to also override ``__getitem__`` for consistant behavior. Thanks to Carl and Russ for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 01:53:56 +00:00
Karen Tracey e061b036a5 Fixed #15722: ensure formsets evaluate to True even if they have no forms. Thanks mlavin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:05:48 +00:00
Chris Beaven 470c70f876 Fixes #16664 -- URLField's to_python method fails with ValueError on some urls on python 2.7. Based on patch by zigzag.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:57:12 +00:00
Chris Beaven fe88584589 Fix and test for cleaning a non-string value in a URLField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16747 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:32:38 +00:00
Russell Keith-Magee a5cbb892f8 Fixed #15315 -- Added support for the 'widget' argument to modelform_factory. Thanks to SardarNL and Will Hardy for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 04:08:24 +00:00
Jannis Leidel bce890ace4 Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:15 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for 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-07-13 09:35:51 +00:00
Jannis Leidel b9eb94e789 Fixed #16230 -- Correctly escape errors message passed to ErrorDict. Thanks, Gregor Müllegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-26 16:52:21 +00:00
Jannis Leidel 8c2099ae64 Fixed #16272 -- Removed stale format class attributes of date-related widgets. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-26 16:52:07 +00:00
Jannis Leidel 22529d41b2 Fixed #15127 -- Properly copy the choices of choice fields. Thanks, dready and Julian Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-16 16:34:38 +00:00
Jannis Leidel 823bac36db Fixed #16246 -- Fixed GenericIPAddressField tests on PostgreSQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-13 20:15:13 +00:00
Jannis Leidel 7f68d06c98 Minor cosmetic cleanup for r16347.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16367 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 15:11:46 +00:00
Jannis Leidel ce3c281090 Fixed #811 -- Added support for IPv6 to forms and model fields. Many thanks to Erik Romijn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 13:48:24 +00:00
Ramiro Morales c43d15b3b3 More removal of poorly legible constructs to workaround Python 2.4 shortcomings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 18:43:29 +00:00
Andrew Godwin dce278673a Fixed #9459: forms.HiddenInput and DateTime field loses microseconds. Thanks to mt.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 17:03:45 +00:00
Carl Meyer 684b0396cf Fixed #14082 -- Use metaclass of provided ModelForm subclass in modelform_factory. Thanks jspiros and Stephen Burrows for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 16:15:54 +00:00
Jannis Leidel 8ce352c21d Fixed #13770 -- Extended BooleanField form field to also clean `u'false'` to `False`. Thanks, jordanb and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-03 11:52:30 +00:00
Jannis Leidel 0b1a061881 Replaced old-style with new-style decorator syntax.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-01 16:46:02 +00:00
Jannis Leidel da3aa22d04 Fixed #5714 -- Strip whitespaces around date and time form field values before converting it to a native type. Thanks to SmileyChris for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-01 16:14:57 +00:00
Chris Beaven 534c427b20 Fixed #13584 -- Optionally allow empty files with django.forms.FileField. Thanks for the patch erickr and closedbracket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16090 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 21:18:27 +00:00
Jannis Leidel abc1e92d85 Fixed #15758 -- Removed stale constants that were missed in r15983.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:27:58 +00:00
Jannis Leidel 7d11c30994 Fixed #6953 -- Correctly sort ManyToMany fields in ModelForms. Thanks, dgouldin, mk and Alex.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16063 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:01:33 +00:00
Russell Keith-Magee 8db51a70da Removed deprecated en_format helper function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:40:14 +00:00
Adrian Holovaty 13864703bc Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Adrian Holovaty 3a5b87cf6d Importing django.forms no longer requires DJANGO_SETTINGS_MODULE. Moved django.db.connections import in django.forms.models to the method where it's used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 04:42:04 +00:00
Luke Plant c411377bd5 Fixed #15349 - Bound FormSet produces bound empty_form
Thanks to hidde-jan for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 15:43:42 +00:00
Luke Plant 13f9fd38dc Fixed #14099 - BaseModelFormSet should use _should_delete_form
Thanks to kenth for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 14:23:02 +00:00
Russell Keith-Magee 1abf126e61 Fixed #9161 -- Ensure that ModelMultipleChoiceField respects to_field_name in validation. Thanks to Honza for the report, and Gregor Müllegger for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-19 14:45:54 +00:00
Carl Meyer 9f6d50d02e Fixed #15182 - Fixed a security issue with ClearableFileInput. Disclosure and new release forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-09 02:41:32 +00:00
Russell Keith-Magee 74ffca17e2 Fixed #10573 -- Corrected autofocus problem in admin when the first widget displayed is a multiwidget. Thanks to rduffield for the report, and to Ramiro and Julien Phalip for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 12:00:21 +00:00
Ramiro Morales f2b0f8ea0f Fixed #15226 - Made SelectDateWidget render the label tag associated with the correct dropdown sub-widget when USE_L10N is active and non-English locale is in use.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 18:16:27 +00:00
Russell Keith-Magee 8ce7beaea0 Fixed #14984 -- Ensure that ClearableFileInput produces XHTML Strict output. Thanks to Luke for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15426 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 06:36:23 +00:00
Russell Keith-Magee b3085f8ae5 Fixed #15167 -- Ensure that non-form errors are always part of an ErrorList. Thanks to Harm Geerts for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 06:33:16 +00:00
Ramiro Morales 2d7049c4ee Fixed #13968 -- Fixed SelectDateWidget processing of an invalid date input value when USE_L10N is on, for consistency with its behavior when USE_L10N=False (now the form field reports the validation error in both cases). Thanks mitar for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 23:46:30 +00:00
Carl Meyer da771cc74c Fixed #14938 - Fixed save-as-new on inline formset with new forms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-25 04:52:54 +00:00