I want to design a table can compare with each other by year.
my data like this:
# views.py
def bybook(request, bookName='A-Book'):
bookdata = models.bookdb.objects.filter(bookName=bookName).order_by('Year', 'point')
return render(request, 'book.html', locals())
I hope result want:
What i have tryed django templates regroup https://docs.djangoproject.com/en/2.0/ref/templates/builtins/#regroup
but can't achieve my require.