[Fixed]-Post form data then render new template

1👍

You can render the out put in the printView itself. No need to write another view. Change your printView to

def printView(request):
    to_print = str(request.POST.get('vals'))
    template = "Sizer/printdata.html"
    context = {'all_data':to_print}
    return render(request, template, context)

Leave a comment