4 ms·
Middlewares, context processors, forms, (class based) views, and tons of third party applications. The CTO of a startup where some friends are working thought
by pyriku 13y ago
Middlewares, context processors, forms, (class based) views, and tons of third party applications.
The CTO of a startup where some friends are working thought the same you did, and 2 years ago rewrote everything to Flask. Now they're going back to Django.
Django is much more that an ORM and templates.
- jokull 13y agoDjango 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.
- pyriku 13y agoCould you please explain why do you think that? IMHO it's a really clever approach.
- simonw 13y agoI'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.
- jokull 13y agoHi 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 https://github.com/plain-vanilla-games/schematics
- plorkyeran 13y agoI'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.
- emidln 13y agoI 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.html http://django-tastypie.readthedocs.org/en/latest/validation....