Skip to content

Commit

Permalink
Update checklist.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Abnormaltype authored Jul 20, 2023
1 parent 0f2de1e commit e170514
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ class GenreList(APIView):
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
```

Another good example:

```python
class GenreList(APIView):
def post(self, request):
serializer = GenreSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
```

Bad example:

```python
Expand Down

0 comments on commit e170514

Please sign in to comment.