How can I use form data in Django directly as context in another view
<p>I'm having big trouble understanding the whole forms business in django. As I understand it the cleaned form data is a dictionary. So all my defined form fields should be in the dictionary like so: {'definedform': userinput, ...}. Is this correct?
I want to create a form in which a user can input data. This data should then be send to a different view, in which the inputted data is rendered with a latex template (and subsequently rendered into a pdf). This works more or less fine if I define the context in the /create_pdf/ view and grab the user input manually. But I suppose there is a nicer way. What I think should work:</p>

<pre><code>def index(request):
    if request.method == "POST":
        persoform = PersonalForm(request.POST, prefix='personal')
        if persoform.is_valid():
            content = persoform.cleaned_data()
            content = Context(content)
            return HttpResponseRedirect('/create_pdf/')
    else:
        persoform = PersonalForm()
    return render(request, 'app/template.html', {'persoform': persoform}) 
</code></pre>

<p>And in my /create_pdf/ view:</p>

<pre><code>def create_pdf(request):
    template = get_template('app/latextemplate.tex')
    rendered_tpl = template.render(content)
    [...]
</code></pre>

<p>So, how can I make sure, to pass the data from my index view to my create_pdf view?</p>

<p>EDIT:</p>

<p>Forgot to mention: The error is "'content' not defined". So I understand that the /create_pdf/ view doesn't get content dictionary, but I have no idea how I would make sure that it does.</p>