标签:log return work views ide logs stat note blog
1.
def retrieve(self, request, pk=None): try: book = Book.objects.get(book_id=pk) except Book.DoesNotExist: return HttpResponse(status=404) # queryset = Book.objects.all() # book = get_object_or_404(queryset, pk=pk) serializer = BookSerializer(book) return Response(serializer.data)
http://www.cnblogs.com/pycode/p/6365905.html
http://www.django-rest-framework.org/api-guide/viewsets/
标签:log return work views ide logs stat note blog
原文地址:http://www.cnblogs.com/javastart/p/6879892.html