Monday, March 29, 2021

django

hi 
i getting this error 
ValueError at /empty range for randrange() (0, 0, 0)

here my code 

    random_object = Trending.objects.all()[randint(0, len(trending) -1)] 

--
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/61600bb6-f877-4588-a799-0b29109d43d5n%40googlegroups.com.

No comments:

Post a Comment