0

I'm following this tutorial , after adding this function in views.py to render a paypal form i get this error "unexpected EOF while parsing"

def subscription(request):
    if request.method == 'POST':
        f = SubscriptionForm(request.POST)
        if f.is_valid():
            request.session['subscription_plan'] = request.POST.get('plans')
            return redirect('process_subscription')
    else:
        f = SubscriptionForm()
    return render(request, 'ecommerce_app/subscription_form.html', locals()
Eric
  • 673
  • 1
  • 7
  • 23

1 Answers1

0

You're missing a closing parenthesis at the end of your render() method:

return render(request, 'ecommerce_app/subscription_form.html', locals()
#                                                                     ^^^

SyntaxError: unexpected EOF while parsing

damon
  • 14,485
  • 14
  • 56
  • 75