Beginnings of the new documentation are [link|http://www.djangoproject.com/documentation/newforms/|here].
\r\n\r\nIn a nutshell:
\r\n\r\n- \r\n
- Manipulators were cumbersome to write, so a declarative metaclass has been introduced for specifying form fields. Form classes can now be declared in much the same way as models. \r\n
- Separation of several concerns; there's now a "widget" layer which handles the actual HTML presentation, and allows you to interchangeably specify different widget types for different fields in the form class. \r\n
- Easier usage; instead of the nasty copy-POSTdata-into-dict-and-validate stuff, you can now pass
request.POST
directly to a form, and forms have anis_valid
method carries out validation for you on demand; you can then read known-good data out of the form'sclean_data
dictionary, which will also have the values converted to appropriate Python types (removing the need fordo_html2python
). \r\n - Custom validation methods can be declared as methods of the form class, taking their names from fields they validate; a
clean_foo
method will be called to validate the form field namedfoo
, for example. \r\n - The internals of newforms work purely with Unicode strings, and we're moving toward having all of Django's internals do that to get out of the hell of "what encoding is this data in". \r\n
So far I'm a big fan of it; I was able to whip up [link|http://django-registration.googlecode.com/svn/trunk/forms.py|a nice little user-registration form] without much code at all, as my first foray into newforms.
\r\n\r\nThe integration into the admin is going to be the next big step; the admin app is getting heavily refactored to take full advantage of newforms and add a lot more flexibility (for example, you'll be able to easily override individual parts of the admin, with full access to the request to do more advanced permissions filtering).