Skip to content

Commit deaaad7

Browse files
committed
Add instructions for missing imports
1 parent f719711 commit deaaad7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ class AlbumViewSet(viewsets.ViewSet):
386386
1. Here we create a class `AlbumViewSet` inheriting from `views.ViewSet`, pay attention, this is nos a model view set.
387387
2. Set the `queryset`
388388
3. Set `serializer_class`, we are going to talk about this `AlbumSerializer` later
389+
4. For now, just import the `AlbumSerializer` with `from music.serializers import AlbumSerializer`
390+
5. Don't forget to import the Album model here with `from music.models import Album`
389391

390392
After this still in the same view we are going through what DRF call actions.
391393
Instead of have methods in the view set for get, post, delete... It has functions based on actions. The actions are the ones below:

0 commit comments

Comments
 (0)