Wednesday, April 22, 2020

Django API Forms

Just found a really cool library for using Django's built-in forms to validate JSON: https://github.com/Sibyx/django_api_forms

I made a small example with it to show how it works with ModelChoiceFields: https://github.com/pawl/django_api_forms_modelchoicefield_example

Seems like a more lightweight version of DRF's serializers (but only for deserializing and validating) and with a similar API to Django's built-in forms.

No comments:

Post a Comment