views.py
def index(request):
allProds = []
catprods = Allmusic.objects.values('category', 'sno')
cats = {item['category'] for item in catprods} for cat in cats: prod = Allmusic.objects.filter(category=cat) n = len(prod) nSlides = n // 4 + ceil((n / 4) - (n // 4)) allProds.append([prod, range(1, nSlides), nSlides])
params = {'allProds':allProds}
return render(request,'index.html',params)
index.html
For More details you can see my stackoverflow page
https://stackoverflow.com/questions/64207103/when-i-click-on-slide-button-of-slider-in-my-website-it-only-slides-only-once-an
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/49c95009-8d05-4f71-bccb-1bcec2e97d26n%40googlegroups.com.
No comments:
Post a Comment