I'm having a strange issue where certain values in a context from my views are not passing to the template in a production environment only. Take the following view:
def products(request,cat_id=0):
if cat_id:
cat = ProductCategory.objects.filter(pk=cat_id)
all_products = Product.objects.filter(product_category=cat_id)
return render(request, 'drsite/products.html', {'all_products': all_products, 'product_category': cat_id})
else:
all_products = Product.objects.all()
return render(request, 'drsite/products.html', {'all_products': all_products})
The product_category value is not passing in a live environment, although is passing just fine in my local environment. The goal of that value is to trigger an active state on an element in the page in addition to rendering the products on the page. Worth noting is the products object is passing fine and rendering as expected.