django-adapters
django-adapters copied to clipboard
Constructible, introspectable serializers and forms
This is second level API with features: - adapter schema & data validation, - adapter chaining, - nested adapters, - schema mutations, Thanks in advance for your feedback
https://github.com/schematics/schematics http://schematics.readthedocs.io/en/latest/index.html Looks like this gets a lot of things right that we're looking at. The API is nice, the `to_primitive` is a pretty good naming convention, and the validation/coercion/conversion...
Top level API should be ideally similar to form/serializer, but it should be informed by a "second level" API which is purely functional. I have something like this in my...
This is a new attempt at #23, let me know what you think! It's still WIP and I will definitely change many things about it.
I think we didn't explicitly mention how extra, non-ORM data should be handled. On the construction step it says in the docs: > It should be easy to modify the...
``` python class Validator(object): def validate(self, value): pass def clean(self, value): self.validate(value) return value class IntegerCleaner(Validator): def clean(self, value): try: value = int(value) except ValueError: raise ValidationError(...) return value class...
Create a prototype of the validation tree, allowing similar chaining of validation/cleaning functions similar to what Naval can do (see #21).
Fixes #2. I focused mostly on json, and I feel like it could be expanded more, but I didn't find enough time to add relevant code examples, so I just...