洞察纵观鸿蒙next版本,如何凭借FinClip加强小程序的跨平台管理,确保企业在数字化转型中的高效运营和数据安全?
476
2022-10-28
django-rest-framework-braces-DRF(Django REST 框架) 实用工具集锦
Django Rest Framework Braces
Collection of utilities for working with DRF. Name inspired by django-braces.
Free software: MIT licenseGitHub: https://github.com/dealertrack/django-rest-framework-bracesDocumentation: 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 MultipleSerializersViewMixinclass 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.
Testing
To run the tests you need to install testing requirements first:
$ make install
Then to run tests, you can use use Makefile command:
$ make test
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~