|
|
|
|
|
by sdrm
1380 days ago
|
|
Definitely use DRF for this kind of usecases. The problem with his approach is that it'll always expose ALL the fields of a model to the frontend, like hashed passwords, and can come at a performance cost if the queryset was run with `.only("some", "fields")`. This can be tolerable for small projects but it doesn't scale too well on the long term... |
|
https://www.django-rest-framework.org/api-guide/serializers/...