from django.shortcuts import render

from .models import *
# Create your views here.
def meal_list(request):
    meal_list=Meals.objects.all()
    categories=Category.objects.all()
    context={
        'meal_list': meal_list,
        'categories':categories,
    }
    return render(request,'meals\meal_list.html',context)

def meal_detail(request,slug):
    meal_detail=Meals.objects.get(slug=slug)
    context={'meal_detail':meal_detail}
    return render(request,'meals\meal_detail.html',context)