mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Canonical API 'skeleton': urls & views
this gives me something to look at and work with, despite being wildly incomplete See #146
This commit is contained in:
9
projects/api_views.py
Normal file
9
projects/api_views.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from rest_framework import viewsets
|
||||
|
||||
from .models import Project
|
||||
from .serializers import ProjectSerializer
|
||||
|
||||
|
||||
class ProjectViewSet(viewsets.ModelViewSet):
|
||||
queryset = Project.objects.all().order_by('id')
|
||||
serializer_class = ProjectSerializer
|
||||
Reference in New Issue
Block a user