rewrote varda dict on correct class
This commit is contained in:
parent
fb9a11b850
commit
3777134ea6
@ -39,17 +39,6 @@ class Lunch_Varda_View(PuckoView):
|
|||||||
|
|
||||||
def lunch(self, request):
|
def lunch(self, request):
|
||||||
file = DAGENS_LUNCH_PATH / "varda.json"
|
file = DAGENS_LUNCH_PATH / "varda.json"
|
||||||
with open(file, "r") as f:
|
|
||||||
data = json.load(f)
|
|
||||||
serializer = self.serializer_class(data)
|
|
||||||
return Response(serializer.data, status=200)
|
|
||||||
|
|
||||||
class Lunch_Heat_View(PuckoView):
|
|
||||||
permission_classes = [AllowAny,]
|
|
||||||
serializer_class = DagensLunchHeat
|
|
||||||
|
|
||||||
def lunch(self, request):
|
|
||||||
file = DAGENS_LUNCH_PATH / "heat.json"
|
|
||||||
with open(file, "r") as f:
|
with open(file, "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
serializer = self.serializer_class({
|
serializer = self.serializer_class({
|
||||||
@ -69,6 +58,17 @@ class Lunch_Heat_View(PuckoView):
|
|||||||
"sallad": data["salad"]
|
"sallad": data["salad"]
|
||||||
})
|
})
|
||||||
return Response(serializer.data, status=200)
|
return Response(serializer.data, status=200)
|
||||||
|
|
||||||
|
class Lunch_Heat_View(PuckoView):
|
||||||
|
permission_classes = [AllowAny,]
|
||||||
|
serializer_class = DagensLunchHeat
|
||||||
|
|
||||||
|
def lunch(self, request):
|
||||||
|
file = DAGENS_LUNCH_PATH / "heat.json"
|
||||||
|
with open(file, "r") as f:
|
||||||
|
data = json.load(f)
|
||||||
|
serializer = self.serializer_class()
|
||||||
|
return Response(serializer.data, status=200)
|
||||||
|
|
||||||
class Lunch_Max_View(PuckoView):
|
class Lunch_Max_View(PuckoView):
|
||||||
permission_classes = [AllowAny,]
|
permission_classes = [AllowAny,]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user