Added viewsets for shelves

This commit is contained in:
maciejrusek
2026-03-10 22:52:39 +01:00
parent 624ef3ca16
commit 271337afcb
7 changed files with 52 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
from django.shortcuts import render
# Create your views here.
from apps.shelves.models import Shelf
from apps.shelves.serializers import ShelfSerializer
from rest_framework import viewsets
class ShelvesViewSet(viewsets.ModelViewSet):
queryset = Shelf.objects.select_related("user")
serializer_class = ShelfSerializer