Commit Graph

248 Commits

Author SHA1 Message Date
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
Carl Meyer 28d0a0f788 Removed dead code in modelforms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-25 04:08:17 +00:00
Carl Meyer 227c5e80db Fixed #11319 - Added lookup support for ForeignKey.to_field. Also reverted no-longer-needed model formsets workaround for lack of such support from r10756. Thanks Russell and Alex for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-25 03:14:28 +00:00
Russell Keith-Magee 1222bd6f6f Fixed #13631 -- Made sure that max_length and min_length are retained as attributes on form fields. Thanks to mila for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13 16:41:46 +00:00
Jannis Leidel f0cd656ee0 Fixed #14933 -- Added ability to SelectDateWidget to cope with new alternative month names added in [14900]. Thanks, alek and Claude Peroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22 00:44:54 +00:00
Jannis Leidel 3cf8502d35 Fixed #4976 -- Stopped humanize template tags to raise a TypeError if passed a value of ``None``. Thanks, Simon G. and Adam Vandenberg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 15:07:43 +00:00
Russell Keith-Magee 7adffaeaf6 Fixed #14655 -- Made formsets iterable. This allows a slightly more natural iteration API (`for form in formsets`), and allows you to easily override the form rendering order. Thanks to Kent Hauser for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-19 13:41:43 +00:00
Jannis Leidel 3d35ac7868 Fixed #14158 -- Fixed SelectMultiple._has_changed to not assume same order of data anymore. Thanks, akaariai and dmoisset.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:58 +00:00
Jannis Leidel 34daa0804c Fixed #14144 -- Made sure custom validators are called in ModelMultipleChoiceFields. Thanks, matiasb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:37 +00:00
Russell Keith-Magee 4a1f2129d0 Fixed #12398 -- Added a TypedMultipleChoiceField. Thanks to Tai Lee.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05 04:47:19 +00:00
Jannis Leidel fb391b8b98 Fixed #8217 -- Correctly sort files in FilePathFields on older Python versions. Thanks, bernd and davidb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14772 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-02 00:49:15 +00:00
Chris Beaven d3f5f219f5 Fixes #10427 -- Abstract the value generation of a BoundField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-28 02:50:31 +00:00
Honza Král 65b380e74a Fixed #11418 -- formset.cleaned_data no longer raises AttributeError when is_valid is True. Thanks mlavin!
This also introduces a slightly backwards-incompatible change in
FormSet's behavior, see the release docs for details.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 17:27:01 +00:00
Chris Beaven b8a78804b5 Fixes #13804 -- URLField validation failure for a url containing '://' on the path and no scheme
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 10:08:28 +00:00
Carl Meyer 008f333bac Fixed pk uniqueness validation for new objects created outside of a ModelForm. Also removed need for ModelForm to poke at Model._state.adding, keeping it an internal ORM concern.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 23:29:58 +00:00
Carl Meyer 38ba3775ec Fixed #14234 -- Re-validating a model instance added via ModelForm no longer throws spurious PK uniqueness errors. Thanks to David Reynolds and Jeremy Dunck.
Also moved Model._adding to Model._state.adding to reduce instance namespace footprint.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 22:43:46 +00:00
Jannis Leidel 33d8fcde8a Fixed #14693, #14709 -- Backwards incompatible change to rectify the confusion around the STATICFILES_URL and STATICFILES_ROOT settings.
* Two new global settings that will be used by -- **but are not limited to** -- the staticfiles app: STATIC_ROOT and STATIC_URL.

  * Moving the 'django.contrib.staticfiles.templatetags.staticfiles' template tag to the core ('django.templatetags.static') and renaming it to 'get_static_prefix'.

  * Moving the context processor 'django.contrib.staticfiles.context_processors.staticfiles' to the core ('django.core.context_processors.static') and renaming it to 'static'.

  * Paths in media definitions will use STATIC_URL as the prefix if the value is not None, and falls back to the previously used MEDIA_URL.

Thanks again to the community for constructive criticism and Carl and Russ for sanity-inducing discussions on IRC.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 15:36:26 +00:00
Honza Král c5df329996 Fixed #12074 -- Adding .as_p and as_ul methods to FormSet. Thanks arthurdebert and dpn for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-18 04:44:49 +00:00
Honza Král 00a685178a Fixed #14119 -- fields_for_model no longer returns all fields when fields parameter is the empty tuple. Thanks alexdutton!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 04:46:33 +00:00
Honza Král 67f9663f52 Fixed #13811 -- Changed unique validation in model formsets to ignore None values, not just omit them
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 00:30:02 +00:00
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Adrian Holovaty bf0947a474 Fixed #11907 -- EmailField now runs strip() on its input. This means mistakenly including leading or trailing spaces will not cause a validation error, and clean() will remove those spaces. Thanks, krisneuharth, djansoft and SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-07 15:50:36 +00:00
Jannis Leidel 392d992f82 Fixed #7048 -- Added ClearableFileInput widget to clear file fields. Thanks for report and patch, jarrow and Carl Meyer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-01 02:02:58 +00:00