Nov 4, 2020
Hi Clement,
I wouldn't use Django REST Framework with Flask. I'd probably pick a serializer like `marshmallow` if I needed model serialization.
In marshmallow, you can add a `fields.Method('my_method')` to your serializer that will call your custom logic.
Of course, if you just need custom logic and no model serialization, you can skip `marshmallow` altogether and just write custom code that returns a `JsonResponse` in your view.