File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -386,6 +386,8 @@ class AlbumViewSet(viewsets.ViewSet):
3863861 . Here we create a class ` AlbumViewSet ` inheriting from ` views.ViewSet ` , pay attention, this is nos a model view set.
3873872 . Set the ` queryset `
3883883 . 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
390392After this still in the same view we are going through what DRF call actions.
391393Instead of have methods in the view set for get, post, delete... It has functions based on actions. The actions are the ones below:
You can’t perform that action at this time.
0 commit comments