You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
394 B
14 lines
394 B
from rest_framework import generics |
|
|
|
from apps.goods.models import Goods |
|
from apps.goods.serializers import GoodsSerializers |
|
|
|
|
|
class GoodsGenerics(generics.ListCreateAPIView): |
|
queryset = Goods.objects.all() |
|
serializer_class = GoodsSerializers |
|
|
|
|
|
class GoodsDetailGenerics(generics.RetrieveUpdateDestroyAPIView): |
|
queryset = Goods.objects.all() |
|
serializer_class = GoodsSerializers
|
|
|