📜  在 django rest 框架中导入状态 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:56.637000             🧑  作者: Mango

代码示例1
from rest_framework import status
from rest_framework.response import Response

def empty_view(self):
    content = {'please move along': 'nothing to see here'}
    return Response(content, status=status.HTTP_404_NOT_FOUND)