News for hackers. Stuff that matters.
Re:Lessons learned defying Joel Spolsky with Django by jokull on Saturday April 27, 2013 @12:16PM (#5618173)
Django middlewares is a poorly designed system. Flask has all of the things you mentioned except for forms. For that you can use Flask-WTF, but these libraries are becoming outdated anyway because they’re HTML based and don’t work so well for JSON validation.
Re:Lessons learned defying Joel Spolsky with Django by emidln on Saturday April 27, 2013 @01:40PM (#5618439)
I don't write much HTML anymore (it's all frontend templating and API calls), but I use Django Forms everywhere. For instance, tastypie supports using a Django Form to handle validation in your API[1].

[1] - http://django-tastypie.readthedocs.org/en/latest/validation....

Re:Lessons learned defying Joel Spolsky with Django by simonw on Saturday April 27, 2013 @12:46PM (#5618252)
I've found Django forms to work extremely well for validating non-form-based data - the API is a neat way of representing a set of validation rules and running them against a set of data.
Re:Lessons learned defying Joel Spolsky with Django by jokull on Saturday April 27, 2013 @02:04PM (#5618504)
Hi Simon - I greatly appreciate your work and opinion! The reason I think HTML forms libraries are insufficient for the problem domain: JSON is richer, both in datatypes and structure. We’re working on a forms library of sorts that is better suited for API serialization/validation and having one central place to define models for multiple internal DB’s.

https://github.com/plain-vanilla-games/schematics

Re:Lessons learned defying Joel Spolsky with Django by plorkyeran on Saturday April 27, 2013 @01:17PM (#5618356)
I've found Flask-WTF to work quite well for validating JSON. It looks a little weird at first due to the naming scheme mismatch, but I haven't encountered any actual functional problems with it.
Re:Lessons learned defying Joel Spolsky with Django by pyriku on Saturday April 27, 2013 @12:30PM (#5618210)
Could you please explain why do you think that? IMHO it's a really clever approach.