3 ms·
> I keep hearing that forms are hell (but I rolled my own forms, so that wasn't a big deal). You should try it for yourself and form your own opinion. I've fou
by apgwoz 17y ago
> I keep hearing that forms are hell (but I rolled my own forms, so that wasn't a big deal).
You should try it for yourself and form your own opinion. I've found the declarative nature of the forms in Django to be extremely pleasant. My biggest complaint is the need for writing forms at all!
- jacquesm 17y agoI've used it for some simple stuff and that worked ok, but as soon as you get forms with ajax integration, auto lookup and auto-reject of fields based on pre-existing keys things get tricky in a hurry. So I rolled my own forms, thinking at the time that it must be possible but not knowing how. Now I hear - from someone in a HN comment - that AJAX and django don't play particularly nice. Here is the thread, I dug it up: http://news.ycombinator.com/item?id=1078743 http://news.ycombinator.com/item?id=1078743
- shabda 17y agoForms are IMO, most misunderstood, and underdocumentated feature of Django. A from is not just a representation of a HTML. A form is, 0. a representation of a HTML form. 1. Knows how to validate and sanitize that data. 2. Know what to do with the data. In my apps, a lot of logic is in forms, (which people generally put in views.) Its written by me, but I think is explains some interesting ways to use forms which people miss and do the hard way. http://uswaretech.com/blog/2010/01/doing-things-with-django-forms/ http://uswaretech.com/blog/2010/01/doing-things-with-django-...