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):
386
386
1 . Here we create a class ` AlbumViewSet ` inheriting from ` views.ViewSet ` , pay attention, this is nos a model view set.
387
387
2 . Set the ` queryset `
388
388
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 `
389
391
390
392
After this still in the same view we are going through what DRF call actions.
391
393
Instead 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