I made a homepage using django, I'm loading my slides and menus dynamically and it was perfect. I put both the menu and the footer through include and it worked 100%.
Now I came across a problem, the product menu loaded on the main page when I click on it is directed to a specific page of that product, it catches perfectly the product data and everything, the only problem is that loading the products within my menu, even being in the include it loses the data, how do I solve this?
view.py
def list_product(request, template_name='home/index.html'):
# product = Product.objects.all()
product = Product.objects.filter(status='True')
products = {'list_products': product}
return render(request, template_name, products)
def about_product(request, pk, template_name='home/product.html'):
about_product = get_object_or_404(Product, pk=pk)
return render(request, template_name, {'about_product': about_product})