mixxorz / django-service-objects

Service objects for Django
MIT License
337 stars 29 forks source link

Add extensive support for DRF #40

Closed PyB1l closed 4 years ago

PyB1l commented 5 years ago

A think your concept is really what default Django is missing. In fact, in serveral business-heavy django apps we have used something like your implementation. I think it should be very useful to support DRF serializers (instead of django forms), integrating with update, create methods.

andreas-bergstrom commented 5 years ago

I agree, but not instead of django forms. It should preferably support both server-rendered apps and API-centric DRF-apps.

c17r commented 4 years ago

django-service-objects uses the Django forms as a freebie way to get input validation. The service object should be disconnected from the UI since service-objects can be called for server-side, DRF, celery, or from inside another service-object.

For DRF, just instantiate and execute the service-object inside the Serializer's create/update methods. How do you see a tighter integration? A custom serializer? DRF fields?