Added missed function
This commit is contained in:
parent
f9c071aa43
commit
c905ad8d5f
@ -21,6 +21,12 @@ class MigrationViewSet(viewsets.ModelViewSet):
|
||||
response = {"message": "this will be upcoming migrations"}
|
||||
return Response(response, status=status.HTTP_200_OK)
|
||||
|
||||
@action(detail=False, methods=['GET'])
|
||||
def missed(self, request, *args, **kwargs):
|
||||
response = {"message": str(Migration.objects.filter(
|
||||
booked_time__gte=timezone.now()).order_by('-booked_time')[:5])}
|
||||
return Response(response, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
class IndexView(generic.ListView):
|
||||
template_name = 'api/index.html'
|
||||
|
||||
Reference in New Issue
Block a user