Django Variations not displayed

In order to list my variations_value i render data into context but when i pass the object to the frontend it's recognised as a queryset but i can't use data from it


variation_category_choice = (
    ('color', 'color',),
    ('size', 'size',),

class Variation(models.Model):
    product = models.ForeignKey(Product, on_delete=models.CASCADE)
    variation_category = models.CharField(max_length=100, choices=variation_category_choice)
    variation_value = models.CharField(max_length=100)
    is_active = models.BooleanField(default=True)
    created_date = models.DateTimeField(auto_now=True)

    def __unicode__(self):
        return self.product


def product_detail(request, category_slug, product_slug):
        single_product = Product.objects.get(category__slug=category_slug, slug=product_slug)
        in_cart = CartItem.objects.filter(cart__cart_id=_cart_id(request), product=single_product).exists()
        variations = Variation.objects.filter(product=single_product)

    except Exception as e:
        raise e

    context = {
        'single_product': single_product,
        'in_cart': in_cart,
        'variations': variations

    return render(request, 'store/product_detail.html', context)


Back to Top