added bsaic viewset classes
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
from rest_framework import viewsets
|
||||||
|
from companies.models import Company
|
||||||
|
from companies.serializers import CompanySerializer
|
||||||
|
|
||||||
|
|
||||||
|
class CompanyViewSet(viewsets.ModelViewSet):
|
||||||
|
queryset = Company.objects.all()
|
||||||
|
serializer_class = CompanySerializer
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
from rest_framework import viewsets
|
||||||
|
from history.models import HistorySync
|
||||||
|
from history.serializers import HistorySyncLogSerializer
|
||||||
|
|
||||||
|
|
||||||
|
class HistorySyncViewSet(viewsets.ModelViewSet):
|
||||||
|
queryset = HistorySync.objects.all()
|
||||||
|
serializer_class = HistorySyncLogSerializer
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
from rest_framework import viewsets
|
||||||
|
from products.models import Product
|
||||||
|
from products.serializers import ProductSerializer
|
||||||
|
|
||||||
|
|
||||||
|
class ProductViewSet(viewsets.ModelViewSet):
|
||||||
|
queryset = Product.objects.all()
|
||||||
|
serializer_class = ProductSerializer
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
from rest_framework import viewsets
|
||||||
|
from stats.models import StatsLog
|
||||||
|
from stats.serializers import StatsLogSerializer
|
||||||
|
|
||||||
|
|
||||||
|
class StatsLogViewSet(viewsets.ModelViewSet):
|
||||||
|
queryset = StatsLog.objects.all()
|
||||||
|
serializer_class = StatsLogSerializer
|
||||||
|
|||||||
Reference in New Issue
Block a user