gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
This commit is contained in:
13
core/apps/eggs/views/daily_cost.py
Normal file
13
core/apps/eggs/views/daily_cost.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from rest_framework import viewsets
|
||||
from rest_framework.response import Response
|
||||
|
||||
from core.apps.eggs.models import DailyCost
|
||||
from core.apps.eggs.serializers import DailyCostSerializer
|
||||
|
||||
|
||||
class DailyCostViewSet(viewsets.ModelViewSet):
|
||||
queryset = DailyCost.objects.all()
|
||||
serializer_class = DailyCostSerializer
|
||||
|
||||
def get_queryset(self):
|
||||
return DailyCost.objects.all().order_by("-id")[:1]
|
||||
Reference in New Issue
Block a user