Re: How to render a grouped list to a template

2015-07-14 Thread abnerpc
You need to use regroup: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#regroup On Sun, Jul 12, 2015 at 8:44 PM, Andrea wrote: > Hello. I'm new to both django and python. > > This in an example code i made up to illustrate my problem: > # Models > class Book(models.Model): > s

How to render a grouped list to a template

2015-07-12 Thread Andrea
Hello. I'm new to both django and python. This in an example code i made up to illustrate my problem: # Models class Book(models.Model): submitted_by = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='book_subby') submitted_date = models.DateField(auto_now=True) book_title =