10 lines
263 B
Python
10 lines
263 B
Python
|
from rest_framework import viewsets
|
||
|
|
||
|
from categories.models import Category
|
||
|
from categories.serializers import CategorySerializer
|
||
|
|
||
|
|
||
|
class CategoryModelViewSet(viewsets.ModelViewSet):
|
||
|
queryset = Category.objects.all()
|
||
|
serializer_class = CategorySerializer
|