Django Rest Framework Braces¶
Collection of utilities for working with DRF. Name inspired by django-braces.
- Free software: MIT license
- GitHub: https://github.com/dealertrack/django-rest-framework-braces
- Documentation: https://django-rest-framework-braces.readthedocs.io.
Installing¶
Easiest way to install django-rest-framework-braces
is by using pip
:
$ pip install django-rest-framework-braces
Usage¶
Once installed, you can use any of the supplied utilities by simply importing them. For example:
from drf_braces.mixins import MultipleSerializersViewMixin
class MyViewSet(MultipleSerializersViewMixin, GenericViewSet):
def create(self, request):
serializer = self.get_serializer(serializer_class=MySerializer)
...
For full list of available utilities, please refer to the documentation.