How to send an array from one view to another

How to send a list from one view to another?

I tried to use request.session to send material_id_list but I got an error.

this is my first view

def get_autotransactions(request):
    material_id_list = []
    slug = request.POST.get('slug')
    for index in range(int(request.POST.get('count'))):
        material_id_list.append(request.POST.get(f'material_id-{index}'))
    request.session['material_id_list'] = material_id_list
    return redirect(f'/management/inventorization/transactions/create/{slug}/')

this is my second view

def form(request, slug):
    material_id_list = request.session['material_id_list']
    extra = 1
    if material_id_list:
        extra = len(material_id_list)
    TransactionItemFormset = modelformset_factory(TransactionItem, formset=TransactionItemBaseFormSet,
        fields=('material', 'supplier', 'amount', 'price'), can_delete=True, extra=extra)
    organization = Organization.objects.get(slug=slug)
    queryset = TransactionItem.objects.none()
    transactionItems = TransactionItemFormset(request.POST or None, queryset=queryset, slug=slug, material_id_list=material_id_list)
    if transactionItems.is_valid():
        tran_dict = {}
        for tran_form in transactionItems:
            if tran_form.is_valid():
                instance = tran_form.save(commit=False)
                if instance.supplier.id:
                    if instance.supplier.id not in tran_dict.keys():
                        form = TransactionForm()
                        tran = form.save(commit=False)
                        tran.organization = organization
                        tran.supplier = instance.supplier
                        tran.created_by = Profile.objects.get(user=request.user)
                        tran.status = TRANSACTION_STATUS.NEW
                        tran.save()
                        instance.transaction = tran
                        tran_dict[instance.supplier.id] = tran
                    else:
                        instance.transaction = tran_dict[instance.supplier.id]
                else:
                    if instance.material.supplier.id not in tran_dict.keys():
                        form = TransactionForm()
                        tran = form.save(commit=False)
                        tran.organization = organization
                        tran.supplier = instance.supplier
                        tran.created_by = Profile.objects.get(user=request.user)
                        tran.status = TRANSACTION_STATUS.NEW
                        tran.save()
                        instance.transaction = tran
                        tran_dict[instance.material.supplier.id] = tran
                    else:
                        instance.transaction = tran_dict[instance.material.supplier.id]
                instance.units = instance.material.material.unit
                instance.remain = instance.amount
                instance.save()
        return redirect('management:inventorization:transactions:income')
    return render(request, f'{BASE_TEMPLATE}/form.html', {
        'transactionItems': transactionItems
    })

this is my url

url(r'^get_autotransactions', views.get_autotransactions, name='get_autotransactions'),
url(r'^create/(?P<slug>\S+)/$', views.form, name='create',),

Don't concentrate on focus on details of these view, the main problem is how I send a list material_id_list to a view named def forms I got the following error:

TypeError Exception Value: form() missing 1 required positional argument: 'material_id_list'