@login_required
def myplans(request):
    user_name = request.user.get_username()
    user = User.objects.get(username=user_name)
    profile = UserProfile.objects.get(user=user)
    plan_list = profile.fav_plans.all()
    return render(request, 'myplans.html', {'plan_list': plan_list})
@login_required
def myplans(request):
    user_name = request.user.get_username()
    user = User.objects.get(username=user_name)
    profile = UserProfile.objects.get(user=user)
    plan_list = profile.fav_plans.all()
    return render(request, 'myplans.html', {'plan_list': plan_list})