summaryrefslogtreecommitdiff
path: root/django/forms
AgeCommit message (Collapse)Author
2011-01-13Fixed #13631 -- Made sure that max_length and min_length are retained as ↵Russell Keith-Magee
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
2010-12-22Fixed #14933 -- Added ability to SelectDateWidget to cope with new ↵Jannis Leidel
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-21Fixed #4976 -- Stopped humanize template tags to raise a TypeError if passed ↵Jannis Leidel
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-19Fixed #14655 -- Made formsets iterable. This allows a slightly more natural ↵Russell Keith-Magee
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-12Fixed #14158 -- Fixed SelectMultiple._has_changed to not assume same order ↵Jannis Leidel
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-12Fixed #14144 -- Made sure custom validators are called in ↵Jannis Leidel
ModelMultipleChoiceFields. Thanks, matiasb. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05Fixed #12398 -- Added a TypedMultipleChoiceField. Thanks to Tai Lee.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-02Fixed #8217 -- Correctly sort files in FilePathFields on older Python ↵Jannis Leidel
versions. Thanks, bernd and davidb. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14772 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-28Fixes #10427 -- Abstract the value generation of a BoundFieldChris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21Fixed #11418 -- formset.cleaned_data no longer raises AttributeError when ↵Honza Král
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-21Fixes #13804 -- URLField validation failure for a url containing '://' on ↵Chris Beaven
the path and no scheme git-svn-id: http://code.djangoproject.com/svn/django/trunk@14657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18Fixed pk uniqueness validation for new objects created outside of a ↵Carl Meyer
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-18Fixed #14234 -- Re-validating a model instance added via ModelForm no longer ↵Carl Meyer
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-17Fixed #14693, #14709 -- Backwards incompatible change to rectify the ↵Jannis Leidel
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-10-18Fixed #12074 -- Adding .as_p and as_ul methods to FormSet. Thanks ↵Honza Král
arthurdebert and dpn for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13Fixed #14119 -- fields_for_model no longer returns all fields when fields ↵Honza Král
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-13Fixed #13811 -- Changed unique validation in model formsets to ignore None ↵Honza Král
values, not just omit them git-svn-id: http://code.djangoproject.com/svn/django/trunk@14193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to ↵Russell Keith-Magee
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-07Fixed #11907 -- EmailField now runs strip() on its input. This means ↵Adrian Holovaty
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-01Fixed #7048 -- Added ClearableFileInput widget to clear file fields. Thanks ↵Jannis Leidel
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-09-26Fixed #13827 -- Cleaned up a few unnecessary function calls.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11Fixed #13390 -- `SplitDateTimeWidget` now recognizes when it's no longer ↵Justin Bronn
required. Thanks vaxXxa for bug report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11Fixed #13149 -- The admin `ForeignKeyRawIdWidget` now properly handles ↵Justin Bronn
non-integer values. Thanks, Chris Adams. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11Fixed #11905: Raise an error on model form creation if a non-existent field ↵Karen Tracey
was listed in fields. Thanks ben and copelco. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10Fixed #13095 -- `formfield_callback` keyword argument is now more sane and ↵Justin Bronn
works with widgets defined in `ModelForm.Meta.widgets`. Thanks, hvdklauw for bug report, vung for initial patch, and carljm for review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-14Fixed #13679, #13231, #7287 -- Ensured that models that have ↵Russell Keith-Magee
ForeignKeys/ManyToManyField can use a a callable default that returns a model instance/queryset. #13679 was a regression in behavior; the other two tickets are pleasant side effects. Thanks to 3point2 for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-07Fixed #8426 - 'helptext' CSS class - hopefully for real this time.Luke Plant
This file was missing from [13519] Thanks to mattmcc for the catch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #12746 -- Updated sorting calls to use 'key' instead of 'cmp'. This ↵Russell Keith-Magee
will be slightly faster in certain circumstances, but more importantly, is a required step for migration to Python 3. Thanks to Martin van Loewis for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #13316 -- Modified the default behavior of PasswordInput to prevent ↵Russell Keith-Magee
reflecting passwords on form failure. Thanks to clouserw for the report. Although this changes nothing at a functional level, this is BACKWARDS INCOMPATIBLE from a UX perspective for anyone that wants passwords to be reflected to the user on form failure. See the 1.3 release notes for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05Fixed #13621 -- Corrected the handling of input formats on date/time form ↵Russell Keith-Magee
fields. Thanks to bufke for the report, zerok and jacmkno for their work on the patch, and Karen, Jannis and Alex for feedback. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-23Fixed #13592 -- Make sure the SelectDateWidget works with dates before 1900 ↵Jannis Leidel
when localization is enabled. Thanks for the report and patch, magnus. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13301 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-21Fixed #13560 -- Fixed localization of widgets.Jannis Leidel
Particularly this fixes the SplitDateTimeField and the AdminDateWidget by localizating the widget's value in its render method instead of the form field. Thanks to David Danier for the report and Russell for help with the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee
workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-03Fixed Python2.4 incompatibility introduced in r13041: datetime.strptime ↵Karen Tracey
classmethod was added in 2.5. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28Fixed #12986 -- Ensured that SelectDateField repopulates correctly when ↵Russell Keith-Magee
USE_L10N=True and locale has a default date input format other than %Y-%m-%d. Thanks to wim@go2people.nl for the report, and walteralini for his draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28Fixed #13431 -- Corrected a unicode literal in select widgets. Thanks to ↵Russell Keith-Magee
gutworth for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27Fixed #12749 -- Corrected a problem with validation of inline primary keys. ↵Russell Keith-Magee
Thanks to Chris.Wesseling@cwi.nl for the report, and nessita for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27Fixed #13407 -- Corrected verbose names for autogenerated m2m models, and ↵Russell Keith-Magee
cleaned up the default form prefix when an autogenerated m2m through model is used in a formset. Thanks to carljm for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31Restored pre-r10062 behavior allowing None from formfield_callback to ↵Brian Rosner
exclude itself from the form git-svn-id: http://code.djangoproject.com/svn/django/trunk@12891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27Fixed #13023 - Removed ambiguity with regard to the max_num option of ↵Jannis Leidel
formsets and as a result of admin inlines. Thanks to Gabriel Hurley for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27Fixed #13032 - Added localize parameter to form fields to be able to ↵Jannis Leidel
selectively enable localization. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-18Fixed #13138: Ensure required=False on a model form field overrides Karen Tracey
blank=False on the underlying model field during model form clean, in order to maintain backward compatibility. Thanks to saxon75 for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16Fixed #12881: Corrected handling of inherited unique constraints. Thanks for ↵Karen Tracey
report fgaudin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16Fixed #12434: Made pretty_name handle empty string and None as input. Thanks ↵Karen Tracey
ales_zoulek and gabrielhurley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12Fixed #11801 -- Corrected form validation to ensure you can still get ↵Russell Keith-Magee
deleted_forms and ordered_forms when a form that is being deleted doesn't validate. Thanks to dantallis for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12771 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-09Fixed #12048 - MultiWidget does not define `__deepcopy__`Luke Plant
Thanks to powderflask for report, test case and initial patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@12739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08Fixed #11183 - BaseForm init leaves pointers pointing back to base_fieldsLuke Plant
Thanks to margieroginski for the report git-svn-id: http://code.djangoproject.com/svn/django/trunk@12733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-07Fixed #12858. DateTime related widgets now handle custom formats properly in ↵Joseph Kocherhans
_has_changed. Thanks for the initial patch, camillo. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-06Fixed #12960. The return value of ModelForm.clean() is now applied to the ↵Joseph Kocherhans
model. Thanks for the report, krejcik. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-03Expanded the fix in [12663] to cover CSS declarations, which were also ↵James Bennett
affected by the bug. Refs #12879. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12665 bcc190cf-cafb-0310-a4f2-bffc1f526a37