Answers for "order by listview django"

1

order by listview django

class Reviews(ListView):
    model = ProductReview
    paginate_by = 50
    template_name = 'review_system/reviews.html'
	#add ordering: the least before the attribute means decreasing order
    ordering = ['-date_created']
Posted by: Guest on December-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language