summaryrefslogtreecommitdiff
path: root/django/newforms
AgeCommit message (Collapse)Author
2007-01-09Fixed #3232 -- newforms: Added save_instance(), which saves a given bound ↵Adrian Holovaty
form's clean_data into a given model instance with the same field names git-svn-id: http://code.djangoproject.com/svn/django/trunk@4300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09newforms: Changed model auto-Form generation so that create() and ↵Adrian Holovaty
apply_changes() are now both called save() -- for the purposes of simplicity git-svn-id: http://code.djangoproject.com/svn/django/trunk@4299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09Fixed #3193 -- newforms: Modified as_hidden() to handle MultipleChoiceField ↵Adrian Holovaty
correctly. Thanks for the report, Honza Kral git-svn-id: http://code.djangoproject.com/svn/django/trunk@4298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09newforms: Added 'initial' parameter to Form, which lets initial data be ↵Adrian Holovaty
specified dynamically git-svn-id: http://code.djangoproject.com/svn/django/trunk@4297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09newforms: Fixed Unicode issue on Python 2.3 when a BoundField's ↵Adrian Holovaty
__unicode__() included non-ASCII characters. Thanks for reporting the error, Johannes Froehlich git-svn-id: http://code.djangoproject.com/svn/django/trunk@4296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-05newforms: Changed Form.ignore_errors to Form.is_bound, which is more ↵Adrian Holovaty
descriptive and can be helpful to access at runtime git-svn-id: http://code.djangoproject.com/svn/django/trunk@4286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-04newforms: Changed Form so that clean_data only exists if a Form is valid. ↵Adrian Holovaty
Thanks for the idea, Honza Kral git-svn-id: http://code.djangoproject.com/svn/django/trunk@4284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28newforms: Implemented apply_changes() method for form_for_instance FormsAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28newforms: Implemented form_for_instance(). The resulting Form class does not ↵Adrian Holovaty
yet have a method that saves the changes git-svn-id: http://code.djangoproject.com/svn/django/trunk@4250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28newforms: Added 'initial' parameter to Field. This allows you to specify ↵Adrian Holovaty
initial data that will be displayed with the form if no data is given. Also added unit tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26newforms: Added max_length and min_length optional arguments to RegexField, ↵Adrian Holovaty
EmailField and URLField. Note that the argument order for those three fields has changed git-svn-id: http://code.djangoproject.com/svn/django/trunk@4241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26newforms: A label can now be the empty string, in which case a label won't ↵Adrian Holovaty
be displayed git-svn-id: http://code.djangoproject.com/svn/django/trunk@4240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26newforms: Changed Form.as_table() to display errors in same <td> as the fieldAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26newforms: Implemented RadioFieldRenderer.__getitem__(), which allows for ↵Adrian Holovaty
index lookup on radio fields git-svn-id: http://code.djangoproject.com/svn/django/trunk@4238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-24newforms: Added django.newforms.extras.widgets, with SelectDateWidget ↵Adrian Holovaty
implementation, plus some unit tests git-svn-id: http://code.djangoproject.com/svn/django/trunk@4236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-24newforms: Removed Widget.requires_data_list parameter, which was made ↵Adrian Holovaty
redundant by Widget.value_from_datadict() git-svn-id: http://code.djangoproject.com/svn/django/trunk@4235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-17Fixed #3153 -- newforms 'label' argument now can contain wacky characters. ↵Adrian Holovaty
Thanks, dswistowski git-svn-id: http://code.djangoproject.com/svn/django/trunk@4223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-17newforms: Added optional 'form' parameter to form_for_modelAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-17newforms: Added BaseForm to django.newforms namespaceAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15newforms: Implemented min_value and max_value options for IntegerFieldAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15newforms: Fixed unexpected behavior with CharField(required=False, ↵Adrian Holovaty
min_length=X). Thanks for reporting, Benjamin Slavin git-svn-id: http://code.djangoproject.com/svn/django/trunk@4217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15newforms: The Form classes created by form_for_model() now have a create() ↵Adrian Holovaty
method, which creates a model instance from the clean_data git-svn-id: http://code.djangoproject.com/svn/django/trunk@4216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15newforms: Changed form_for_model() to ignore a field if its formfield() ↵Adrian Holovaty
returns None, and changed AutoField.formfield() to return None git-svn-id: http://code.djangoproject.com/svn/django/trunk@4214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15newforms: Added initial implementation of form_for_model and form_for_fieldsAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15newforms: Split the Form class into BaseForm and Form. The former has all ↵Adrian Holovaty
the Form logic; the latter just implements the metaclass that allows for declarative form definition. This change makes it easier to allow other (i.e., non-declarative) designation of a form's fields in creating a form class git-svn-id: http://code.djangoproject.com/svn/django/trunk@4204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-14Fixed #3143 -- Added TimeField to newforms. Thanks, jkocherhansAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-13Fixed #3139 -- newforms BoundField no longer returns empty errors when using ↵Adrian Holovaty
a prefix. Thanks, jkocherhans git-svn-id: http://code.djangoproject.com/svn/django/trunk@4199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-13Fixed #3112 -- Changed newforms Form.as_table() to use <th> instead of <td> ↵Adrian Holovaty
for first column git-svn-id: http://code.djangoproject.com/svn/django/trunk@4197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-13Fixed #3114 -- newforms MultipleChoiceField now handles MultiValueDicts ↵Adrian Holovaty
properly. Thanks for the patch, Honza Král git-svn-id: http://code.djangoproject.com/svn/django/trunk@4196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-12Fixed #3132 -- Added prefix support for newforms. Thanks, jkocherhansAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-11newforms: Changed Form to use auto_id by defaultAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-08Fixed #3102 -- newforms: Fields can now designate their human-friendly ↵Adrian Holovaty
labels. BoundField.verbose_name is now BoundField.label git-svn-id: http://code.djangoproject.com/svn/django/trunk@4188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-08newforms: Added Field.widget_attrs() hook, which lets a Field designate HTML ↵Adrian Holovaty
attributes to use in its widget. Implemented CharField.widget_attrs(), which sets the HTML maxlength attribute for <input type='text'> and <input type='password'>. Thanks for the idea, Gary Doades git-svn-id: http://code.djangoproject.com/svn/django/trunk@4187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-08Fixed small Unicode error in newforms. Thanks, Honza Král. Refs #3114Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Changed Form._html_output() to use dictionary-style format strings ↵Adrian Holovaty
for more flexibility. Thanks, Waylan Limberg git-svn-id: http://code.djangoproject.com/svn/django/trunk@4182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Abstracted common code in Form as_table(), as_ul() and as_p() into ↵Adrian Holovaty
Form._html_output(). It's slightly obscure but saves on a lot of redundancy and code bloat. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07Fixed #3107 -- newforms: Added Form.as_p()Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Form.as_ul() no longer puts hidden fields between <li>s. Similar ↵Adrian Holovaty
to [4175], which was the same thing for Form.as_table(). Refs #3101 git-svn-id: http://code.djangoproject.com/svn/django/trunk@4177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Same fix as [4174], except for Form.as_table()Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07Fixed #3101 -- newforms: Form.as_table() no longer puts hidden fields ↵Adrian Holovaty
between <tr>s. Thanks for reporting, Eric git-svn-id: http://code.djangoproject.com/svn/django/trunk@4175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Small potential bugfix in Form.as_ul() -- called unicode() on ↵Adrian Holovaty
BoundField rather than str() git-svn-id: http://code.djangoproject.com/svn/django/trunk@4174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Changed Table.as_table() and Table.as_ul() to put hidden-form ↵Adrian Holovaty
errors at the top of the output rather than in field order git-svn-id: http://code.djangoproject.com/svn/django/trunk@4173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07newforms: Simplified BoundField._errors()Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-06Fixed #3095 -- Added translation strings to newforms. Thanks for the patch, ↵Adrian Holovaty
Honza Král git-svn-id: http://code.djangoproject.com/svn/django/trunk@4166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-05newforms: Added __unicode__() methods wherever there were __str__() methods, ↵Adrian Holovaty
and changed the __str__() methods to delegate to __unicode__().encode(settings.DEFAULT_CHARSET) git-svn-id: http://code.djangoproject.com/svn/django/trunk@4163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-05newforms: Removed DEFAULT_ENCODING import from fields.pyAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-05newforms: Changed BoundField form, field and name attributes to remove ↵Adrian Holovaty
leading underscore to imply that they can be accessed git-svn-id: http://code.djangoproject.com/svn/django/trunk@4160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30newforms: Added check_test argument to CheckboxInput and changed its ↵Adrian Holovaty
render() behavior slightly. Also changed CheckboxSelectMultiple to use checkboxes with the same name, rather than checkboxes with separate names git-svn-id: http://code.djangoproject.com/svn/django/trunk@4148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30Fixed #3082 -- newforms: Changed Form as_table() and as_ul() not to display ↵Adrian Holovaty
verbose names for hidden fields, and to add field-name prefix to error messages to avoid user confusion. Also added unit tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30newforms: Added BoundField.as_hidden()Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4145 bcc190cf-cafb-0310-a4f2-bffc1f526a37