标签:response sel work 源码 self name ram 模式 user
2.1、前端开发
2.2、后端开发
3.1、FBV
def users(request):
if request.method == ‘GET‘:
user_list = [‘name‘: ‘yiwen‘]
return HttpResponse(json.dumps((user_list)))
3.2、CBV
class StudentsView(View):
def get(self, request):
return HttpResponse(‘get‘)
def post(self, request):
return HttpResponse(‘post‘)
def put(self, request):
return HttpResponse(‘put‘)
def delete(self, request):
return HttpResponse(‘delete‘)
标签:response sel work 源码 self name ram 模式 user
原文地址:https://www.cnblogs.com/YiwenGG/p/14304222.html