def index(request):
    popular_plan_list = reformat_plan(Plan.objects.filter(active=True).order_by('-views')[:3])
    recent_plan_list = reformat_plan(Plan.objects.filter(active=True).order_by('-pub_date')[:3])
    context_dict = {'popular_plans': popular_plan_list, 'recent_plans': recent_plan_list}
    return render(request, 'index.html', context_dict)
def index(request):
    popular_plan_list = reformat_plan(Plan.objects.filter(active=True).order_by('-views')[:3])
    recent_plan_list = reformat_plan(Plan.objects.filter(active=True).order_by('-pub_date')[:3])
    context_dict = {'popular_plans': popular_plan_list, 'recent_plans': recent_plan_list}
    return render(request, 'index.html', context_dict)