Set the attribute orderingfor the view.
class Reviews(ListView):
model = ProductReview
paginate_by = 50
template_name = 'review_system/reviews.html'
ordering = ['-date_created']
If you need to dynamically reorder, you can use instead get_ordering.
class Reviews(ListView):
...
def get_ordering(self):
ordering = self.GET.get('ordering', '-date_created')
return ordering
If you always sort a fixed date field, you might be interested ArchiveIndexView.
from django.views.generic.dates import ArchiveIndexView
class Reviews(ArchiveIndexView):
model = ProductReview
paginate_by = 50
template_name = 'review_system/reviews.html'
date_field = "date_created"
, ArchiveIndexView , allow_future True.