devicehub-django/snapshot/views.py

12 lines
293 B
Python

# from django.shortcuts import render
from rest_framework import viewsets
from snapshot.models import Snapshot
from snapshot.serializers import SnapshotSerializer
class SnapshotViewSet(viewsets.ModelViewSet):
queryset = Snapshot.objects.all()
serializer_class = SnapshotSerializer