from django.shortcuts import render
from .models import Program

# Create your views here.
def programs(request):
    # Get all active programs ordered by order field and creation date
    programs = Program.objects.filter(active=True).order_by('order', 'created_at')
    
    context = {
        'programs': programs,
    }
    
    return render(request, 'programs/programs.html', context)
