Django-NotesApp/project/notes/views.py
2023-02-24 00:13:44 +08:00

9 lines
287 B
Python

from django.shortcuts import render
from rest_framework import viewsets
from .serializers import NoteSerializer
from .models import Note
class NoteViewSet(viewsets.ModelViewSet):
queryset = Note.objects.all().order_by('date_created')
serializer_class = NoteSerializer