Tag:drf

  • Use of Django rest framework current limiting function

    Time:2022-6-21

    catalogue Body start 1. current limiting in DRF 2. current limiting advanced configuration 3. analysis of current limiting ideas 4. source code analysis 5. other precautions reference material Body start Let’s start with the concept of current limiting, which was first introduced at the front end. The real business scenario is that when you enter […]

  • Specific use of DRF serializer serializer

    Time:2022-3-10

    catalogue 1、 Serializer serializer 2、 Use of serializers Simple use Advanced use source **SerializerMethodField( ) ** General parameters 3、 Deserialization data verification Field properties Local hook global hook validators 4、 Serializer operation data Query all Query single New data Modify data Delete data 5、 Model class serializer 6、 Source code analysis many = true 1、 […]

  • Implementation of DRF request and response

    Time:2022-1-2

    catalogue 1 request and response 1.1 request 1.2 response 2 view 2.1 write interface based on apiview 2.2 interface written based on genericapiview 2.3 interface based on genericapiview and 5 view extension classes 2.4 write 5 interfaces using modelviewset 2.5 source code analysis viewsetmixin 2.6 view class inheriting viewsetmixin 1 request and response 1.1 request […]

  • DRF filters and sorts the process records of paging exception handling

    Time:2021-12-29

    catalogue 1、 Filter 2、 Sort 3、 Pagination PageNumberPagination LimitOffsetPagination CursorPagination Inherit apiview usage 4、 Exception handling Source code analysis How 5、 Encapsulate the response object summary 1、 Filter To filter the list data by fields, you need to add Django filter module usage method: #1. Register and register settings in the app py INSTALLED_APPS = […]