On 10/26/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> I've attached the first draft implementation of the manipulator ...

Yeay!  Progress.  I'm +1 for progress.

I like the direction towards simplification and separation, but I'm
not sure if the line is drawn at the correct place.  Essentially with
the Form-Widget proposal, we've split up the "to_html" (render) and
"to_python" into two different classes.  Is that something we really
want to do?  I ask sincerely, are there many use-cases for taking the
data in one way but rendering it another?

Why not Widgets as the main class, and pass it a conversion function?
class ContactForm(Form):
     subject = TextArea()
     date =  CharField(to_python=convert_date)
     email = CharField(to_python=convert_regex(email_re))

I still don't like the as_text / as_ul stuff.  I think that belongs in
template tags.  Although I am a bit swayed by Russell's idea of
throwing that stuff into a dictionary.

form_for_fields / form_for_model +1!

Other questions:
1. Default data looks like it will be annoying to put in the view.
2. Validation!  I hate validation.  Let's just ignore it.  If the user
enters wrong information, its their fault, right?  Why does Django
have to deal with it!?
3. We still need a way to render the whole form in a one-to-three-liner.
4. Is model validation completely dropped to the way-side?  Maybe we
could make a conversion library.  Conversion functions could be passed
around easily, and the Form Field "DateTime" could point to the exact
same converter that the Model Field "DateTime" points to.
5. How would sub-forms work?  Lately I've been experimenting with form
"trees".  I've been working on a very complex form that gathers data
via Javascript into one long JSON tree, or collection of dictionaries
and lists.  Each dictionary describes data that is updated on a model
object, and each list describes a set of related objects.  I'd like to
see this support a like structure.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to