摘要: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { # LOGGING FORMAT 'standard': { 'format': '[%(asctime)s] [%(filename)s:%(li 阅读全文
posted @ 2020-10-25 18:10 不带R的墨菲特 阅读(95) 评论(0) 推荐(0)
摘要: from rest_framework.viewsets import ModelViewSet from .serializers import SerializerStudent from rest_framework.response import Response from django.h 阅读全文
posted @ 2020-10-25 17:58 不带R的墨菲特 阅读(145) 评论(0) 推荐(0)
摘要: pip install coreapi 配置settings.py REST_FRAMEWORK={ 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema', } 全局路由配置docs路由: from rest_framework.do 阅读全文
posted @ 2020-10-25 16:47 不带R的墨菲特 阅读(205) 评论(0) 推荐(0)
摘要: 1,有空补上 阅读全文
posted @ 2020-10-25 03:10 不带R的墨菲特 阅读(136) 评论(0) 推荐(0)
摘要: from rest_framework.generics import GenericAPIView from .models import Student,TeacherClass,Teacher,Class from .serializers import SerializerStudent f 阅读全文
posted @ 2020-10-25 01:12 不带R的墨菲特 阅读(316) 评论(0) 推荐(0)