version 20
This commit is contained in:
parent
4ea794681e
commit
b0d2c02bf5
Binary file not shown.
@ -1,13 +1,10 @@
|
||||
import os
|
||||
from django.shortcuts import render
|
||||
from django.http import Http404
|
||||
from django.conf import settings
|
||||
from rest_framework import viewsets
|
||||
from .models import Seller, Product, Category
|
||||
from .serializers import SellerSerializer, ProductSerializer, CategorySerializer
|
||||
|
||||
def serve_frontend(request, path=''):
|
||||
return render(request, 'core/index.html')
|
||||
return render(request, 'index.html')
|
||||
|
||||
class CategoryViewSet(viewsets.ModelViewSet):
|
||||
queryset = Category.objects.all()
|
||||
@ -19,4 +16,4 @@ class SellerViewSet(viewsets.ModelViewSet):
|
||||
|
||||
class ProductViewSet(viewsets.ModelViewSet):
|
||||
queryset = Product.objects.all()
|
||||
serializer_class = ProductSerializer
|
||||
serializer_class = ProductSerializer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user