version 18
This commit is contained in:
parent
658ba85e2b
commit
0562fa6c32
Binary file not shown.
@ -1,12 +1,13 @@
|
||||
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, 'index.html')
|
||||
return render(request, 'core/index.html')
|
||||
|
||||
class CategoryViewSet(viewsets.ModelViewSet):
|
||||
queryset = Category.objects.all()
|
||||
@ -18,4 +19,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