when I click the right button in my slider it moves right, but after once moving right its neither moves right nor left even after clicking the slide left button or slide right button. views.py here is my views file where I have made logic for slid

27 views
Skip to first unread message

Dhruvil Shah

unread,
Oct 24, 2020, 1:48:45 PM10/24/20
to Django users
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




  






index.html
Reply all
Reply to author
Forward
0 new messages