def star(request, star_id):
"""
Returns star detail
---
serializer: stars.serializers.StarSerializer
responseMessages:
- code: 401
message: Unauthorized. Authentication credentials were not provided. Invalid token.
- code: 403
message: Forbidden, authentication credentials were not provided
- code: 404
message: Not found
"""
if request.method == 'GET':
star = get_object_or_404(Star, pk=star_id)
serializer = StarSerializer(star)
return Response(serializer.data, status=status.HTTP_200_OK)
评论列表
文章目录