summaryrefslogtreecommitdiff
path: root/django/newforms
AgeCommit message (Collapse)Author
2007-04-27Fixed #3698 -- Modified newforms labels to only add a colon if the label ↵Russell Keith-Magee
text doesn't end with punctuation. Thanks, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26Fixed #4040 -- Changed uses of has_key() to "in". Slight performanceMalcolm Tredinnick
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26Fixed #3787, #3788 -- Corrected check for IndexError on MultiValueField, and ↵Russell Keith-Magee
fixed the value_from_datadict method for MultiWidgets to handle Multiwidgets containing Multiwidgets. Also added a testcase walking through the use of MultiWidget/MultiValueField. Thanks to Max Derkachev for reporting these issues and providing fixes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-24Fixed #3870, Refs #3787 -- Fixed handling of widget attributes on ↵Russell Keith-Magee
RadioSelect and MultiWidget. In particular, handling of the id attribute has been fixed. Thanks to Gary Wilson and Max Derkachev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-21Fixed #3821 -- Added a widget class attribute to ChoiceField andMalcolm Tredinnick
MultipleChoiceField. This makes them consistent with other field classes and make subclassing easier. This is a backwards compatible change. Thanks, Max Dekachev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-09Fixed #3929 -- Newforms Textarea widget now always includes 'rows' and ↵Adrian Holovaty
'cols' attributes, even if you don't pass them in, for HTML correctness. Thanks, and welcome back, Luke Plant git-svn-id: http://code.djangoproject.com/svn/django/trunk@4961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-04Cleaned up [4924]. Sorry; wasn't concentrating enough.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-04Fixed #3597 -- Fixed unicode encoding problem in form rendering. Thanks,Malcolm Tredinnick
Georgi Stanojevski and Ville Säävuori. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4924 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-04Moved smart_unicode and StrAndUnicode to django.utils.encoding. They are usefulMalcolm Tredinnick
outside of newforms. This is backwards compatible as far as smart_unicode goes (since newforms.util still imports it). All imports of smart_unicode and StrAndUnicode have also been updated. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-02Fixed #3600 -- Made smart_unicode respect deferred evaluation in the caseMalcolm Tredinnick
of strings translated with gettext_lazy and friends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-01Fixed #3810 -- In newforms, copy attribute dictionaries before modifying themMalcolm Tredinnick
in place. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-01Tweaked formatting so that comments are readable on 80-char terminals.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-31Fixed #3635 -- Fixed KeyError problem in newforms.model.save_instance().Malcolm Tredinnick
Thanks, ludo@qix.it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21Added a comment to ModelChoiceField from [4552]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21Fixed #3534 -- newforms ModelChoiceField and ModelMultipleChoiceField no ↵Adrian Holovaty
longer cache choices. Instead, they calculate choices via a fresh database query each time the widget is rendered and clean() is called git-svn-id: http://code.djangoproject.com/svn/django/trunk@4552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20Fixed #3490 -- Fixed issue with newforms ChoiceField and generators as ↵Adrian Holovaty
choices. Thanksfor the patch, Chris.Wesseling@cwi.nl git-svn-id: http://code.djangoproject.com/svn/django/trunk@4549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20Fixed #3247 -- newforms form_for_model() and form_for_instance() no longer ↵Adrian Holovaty
create form fields for database fields with editable=False. Thanks for the patch, mssnlayam@yahoo.com and Philipp Keller git-svn-id: http://code.djangoproject.com/svn/django/trunk@4548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20Fixed #3257 -- Added newforms ModelChoiceField and ModelMultipleChoiceField, ↵Adrian Holovaty
which are now used by form_for_model() and form_for_instance(). Thanks for the patch, Honza Kral, floguy@gmail.com and kilian.cavalotti git-svn-id: http://code.djangoproject.com/svn/django/trunk@4547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-19Fixed #3510 -- newforms validation errors are now HTML-escaped for HTML ↵Adrian Holovaty
output. Thanks, scott@staplefish.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@4544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-19Improved newforms to handle wacky characters in Field help_textAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Fixed #3506 -- Changed newforms BoundField.help_text to an empty string if ↵Adrian Holovaty
None. Thanks for the patch, Thomas Steinacher git-svn-id: http://code.djangoproject.com/svn/django/trunk@4528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Created django.contrib.localflavor, for country- and culture-specific ↵Adrian Holovaty
functionality. Moved django/newforms/extras/usa.py into there git-svn-id: http://code.djangoproject.com/svn/django/trunk@4524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Fixed #3409 -- Added render_value argument to newforms PasswordInput. Thanks ↵Adrian Holovaty
for the patch, scott@staplefish.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@4523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Fixed #3314 -- Fixed a bug in newforms smart_unicode. Thanks for the patch, neshAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Fixed #3456 -- Made it easier/more intuitive to render newforms help_text in ↵Adrian Holovaty
templates git-svn-id: http://code.djangoproject.com/svn/django/trunk@4521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Added empty space in newforms BaseForm.__init__() to visually group a ↵Adrian Holovaty
lengthy comment with the code that it's commenting git-svn-id: http://code.djangoproject.com/svn/django/trunk@4520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15Fixed #1466 -- Added newforms USZipCodeFieldAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-14Implemented subclassing Forms in newformsAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13Fixed #3489 -- Changed newforms to use copy.copy() in constructing ↵Adrian Holovaty
self.fields, so changes to self.fields in a given form instance do not affect other instances git-svn-id: http://code.djangoproject.com/svn/django/trunk@4504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-05newforms: Changed ChoiceField error message *not* to include user-provided inputAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-29Improved newforms.models.save_for_instance() to set many-to-many values via ↵Adrian Holovaty
ID instead of instance, to save on a database query, thanks to [4448] git-svn-id: http://code.djangoproject.com/svn/django/trunk@4449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-28Fixed #3255 -- Added help_text argument to newforms Field class.Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-28Fixed #3263 -- newforms form_for_model() and form_for_instance() now handle ↵Adrian Holovaty
foreign-key and many-to-many data properly. Thanks for the patch, Jeff Hilyard git-svn-id: http://code.djangoproject.com/svn/django/trunk@4439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27Fixed #3334 -- Changed newforms Form class construction so that appending to ↵Adrian Holovaty
(or altering) self.fields affects only the instance, not the class. As a consequence, self.fields is created in Form.__init__(). The form metaclass now creates a variable self.base_fields instead of self.fields. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27Fixed #3312 -- CheckboxSelectMultiple no longer uses duplicate ID attributes ↵Adrian Holovaty
for each checkbox git-svn-id: http://code.djangoproject.com/svn/django/trunk@4436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27Fixed #3300 -- Changed newforms Select widget to collapse 'choices' into a ↵Adrian Holovaty
list if it's an iterable, so the iterable can be iterated over multiple times. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-24newforms: Implemented NullBooleanField and NullBooleanSelectAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-23newforms: Added MultiValueField, SplitDateTimeField, MultiWidget, ↵Adrian Holovaty
SplitDateTimeWidget git-svn-id: http://code.djangoproject.com/svn/django/trunk@4403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-22newforms: Added formfield_callback argument to form_for_model and ↵Adrian Holovaty
form_for_instance. The admin reworking will need this hook. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-21Fixed #3196 -- Fixed inconsistency in setting choices on ChoiceFields ↵Adrian Holovaty
dynamically git-svn-id: http://code.djangoproject.com/svn/django/trunk@4379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-21newforms: Fixed confusing behavior when setting choices for ChoiceFields and ↵Adrian Holovaty
their corresponding Widgets. Now, a Widget uses the choices from its ChoiceField regardless of whether the Widget has its own choices. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-20newforms: Moved flatatt function from widgets.py to util.pyAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-20newforms: Added attrs optional argument to BoundForm.label_tag()Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-20Fixed #3303 -- Cleaned some newforms clean() method implementations. Thanks ↵Adrian Holovaty
for the patch, SmileyChris git-svn-id: http://code.djangoproject.com/svn/django/trunk@4367 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-20Fixed #3337 -- Changed newforms Field subclasses to use super(). Thanks for ↵Adrian Holovaty
the patch, Dirk Datzert git-svn-id: http://code.djangoproject.com/svn/django/trunk@4366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13Fixed #3281 -- newforms: URLField now works properly with required=False and ↵Adrian Holovaty
verify_exists=True together. Thanks, zendak git-svn-id: http://code.djangoproject.com/svn/django/trunk@4313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13Fixed #3293 -- newforms: Changed IntegerField.clean() to return None if ↵Adrian Holovaty
field is not required and empty. Thanks, Honza Kral git-svn-id: http://code.djangoproject.com/svn/django/trunk@4312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13Fixed #3289 -- newforms: Added value_from_datadict method to MultipleHiddenInputAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10Fixed #3266 -- newforms: Made RadioSelect accept funky characters. Thanks ↵Adrian Holovaty
for reporting, Honza Kral git-svn-id: http://code.djangoproject.com/svn/django/trunk@4304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10Fixed #3278 -- newforms: Fixed bug in DeclarativeFieldsMetaclass where it ↵Adrian Holovaty
inadvertently overrode the class' name. Thanks, russblau@imapmail.org git-svn-id: http://code.djangoproject.com/svn/django/trunk@4303 bcc190cf-cafb-0310-a4f2-bffc1f526a37