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):
|
||||
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:
|
||||
data = json.load(f)
|
||||
serializer = self.serializer_class({
|
||||
@ -69,6 +58,17 @@ class Lunch_Heat_View(PuckoView):
|
||||
"sallad": data["salad"]
|
||||
})
|
||||
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):
|
||||
permission_classes = [AllowAny,]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user