I would like to hear your opinions on this approach. The thing I do is that I have one page where the user can fill the form - order. I want user to fill the form, then click on the 'next' button. After click on the next button, he can see created orders in a table so they can check, whether the orders are correct. Then, they click on confirm and orders are saved into the db. So I have two views. One view renders a page with form. After clicking on next, the view validates form and calls another view - confirm_order. The confirm_order view renders a page with a table with orders. Now, when they click on submit, orders are saved into the db. One thing doesn't work, it's saving orders into db after click on submit because I don't know how to resend the same context (it contains form fields). But I would like to hear what should I do better, thanks. I think that the code could be much smaller and more elegant. def create_order(request):    LanguageLevelFormSet = formset_factory(LanguageLevelForm, extra=5, max_num=5)    language_level_formset = LanguageLevelFormSet(request.POST or None)    job_creation_form = JobCreationForm(request.POST or None, request.FILES or None)    context = {'job_creation_form': job_creation_form,               'formset': language_level_formset}    if request.method == 'POST':        if job_creation_form.is_valid() and language_level_formset.is_valid():            cleaned_data_job_creation_form = job_creation_form.cleaned_data            cleaned_data_language_level_formset = language_level_formset.cleaned_data            context = {                'cleaned_data_job_creation_form': cleaned_data_job_creation_form,                cleaned_data_language_level_formset: cleaned_data_language_level_formset,            }            mutable = request.POST._mutable # I'm adding parameter 'review' to be able to differ between two different posts in confirm_order view            request.POST._mutable = True            request.POST['review'] = True            request.POST._mutable = mutable            return confirm_order(request, context)        else:            return render(request, 'auth/jobs/create-job.html', context=context)    return render(request, 'auth/jobs/create-job.html', context=context)def confirm_order(request, context):    print context    cleaned_data_job_creation_form = context['cleaned_data_job_creation_form']    cleaned_data_language_level_formset = context['cleaned_data_language_level_formset']    print request.POST['review']    if request.method == 'POST' and request.POST['review'] == True:        file = cleaned_data_job_creation_form['file']        count = 5 #simplified multiple rows        jobs = []        for language_level_form in [d for d in cleaned_data_language_level_formset if d]:            language = language_level_form['language']            level = language_level_form['level']            d = {}            d['language_from'] = cleaned_data_job_creation_form['language_from'].name            d['language_to'] = language            d['number_of_characters'] = count            d['price_per_sign'] = 1            d['estimated_price'] = count * d['price_per_sign']            jobs.append(d)        table = CreatedOrdersTable(jobs)        context = {'table': table,                   'cleaned_data_job_creation_form': cleaned_data_job_creation_form,                   'cleaned_data_language_level_formset': cleaned_data_language_level_formset}        return render(request, 'auth/jobs/confirm-order.html', context=context)    else:        for language_level_form in [d for d in cleaned_data_language_level_formset if d]:            language = language_level_form['language']            level = language_level_form['level']            Job.objects.create(                    customer=request.user,                    text_to_translate=cleaned_data_job_creation_form['text_to_translate'],                    file=cleaned_data_job_creation_form['file'],                    short_description=cleaned_data_job_creation_form['short_description'],                    notes=cleaned_data_job_creation_form['notes'],                    language_from=cleaned_data_job_creation_form['language_from'],                    language_to=language,                    level=level,            )        return HttpResponseRedirect('/order-success')
Rendering a confirm page before saving form to db
python;django