'How to pass values multiple html file by render_to_string class in django?

This is my code when I delete a product from header_3.html everything fine but I want to do the same delete work on the cart page. It working but need to reload the page. how to pass multiple html file names through render_to_string?

selected_item_html = render_to_string(
            'header_3.html',
            {
                'num_of_cart': cart_value,
                'total_cart': total_cart,
                'subtotal_amount': cart.get_subtotal_price(),
            }

If I replace header_3.html with cart.html it working fine but I want both header_3.html and cart.html



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source