mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
this gives me something to look at and work with, despite being wildly incomplete See #146
17 lines
523 B
Python
17 lines
523 B
Python
from rest_framework import viewsets
|
|
|
|
from .models import Issue, Grouping
|
|
from .serializers import IssueSerializer, GroupingSerializer
|
|
|
|
|
|
class IssueViewSet(viewsets.ReadOnlyModelViewSet):
|
|
queryset = Issue.objects.all().order_by('digest_order') # TBD
|
|
serializer_class = IssueSerializer
|
|
|
|
|
|
class GroupingViewSet(viewsets.ReadOnlyModelViewSet):
|
|
queryset = Grouping.objects.all().order_by('grouping_key') # TBD
|
|
serializer_class = GroupingSerializer
|
|
|
|
# TODO: the idea of required filter-fields when listing.
|