Re: problems with order by month

2018-08-22 Thread Franklin Sarmiento
hi Osvaldo, try filtering by date ( by month and date ), do you can filter by month and day ??? if this is what do you want, so, you can filter by date by example: "fechanacimiento__date", so, the queryset sould be this: Alumno.objecs.filter(.).order_by('fechanacimiento__date') # by default

Re: problems with order by month

2018-08-22 Thread Phako Perez
I think you miss the column to order cardio = Alumno.objects.filter ( fechanacimiento __month = now.month).order_by(‘fechanacimiento’) Should be cardio = Alumno.objects.filter ( fechanacimiento __month = now.month).order_by(‘fechanacimiento_day’) Sent from my iPhone > On Aug 21, 2018, at

Re: problems with order by month

2018-08-21 Thread Osvaldo Ruso Olea
ardio = Alumno.objects.filter ( fechanacimiento __month = > now.month).order_by(‘fechanacimiento’) > > > > > > *From:* django-users@googlegroups.com [mailto: > django-users@googlegroups.com] *On Behalf Of *Osvaldo Ruso Olea > *Sent:* Monday, August 20, 2018 9:49 PM > *T

Re: problems with order by month

2018-08-21 Thread Osvaldo Ruso Olea
Pava () >> escribió: >> >>> You can chain the methods. >>> >>> cardio = Alumno.objects.filter ( fechanacimiento __month = >>> now.month).order_by(‘fechanacimiento’) >>> >>> >>> >>> >>> >>> *From:* dj

Re: problems with order by month

2018-08-21 Thread Franklin Sarmiento
y(‘fechanacimiento’) >> >> >> >> >> >> *From:* django-users@googlegroups.com [mailto: >> django-users@googlegroups.com] *On Behalf Of *Osvaldo Ruso Olea >> *Sent:* Monday, August 20, 2018 9:49 PM >> *To:* django-users@googlegroups.com >

Re: problems with order by month

2018-08-21 Thread Franklin Sarmiento
hanacimiento’) > > > > > > *From:* django-users@googlegroups.com [mailto: > django-users@googlegroups.com] *On Behalf Of *Osvaldo Ruso Olea > *Sent:* Monday, August 20, 2018 9:49 PM > *To:* django-users@googlegroups.com > *Subject:* Re: problems with order by month > &g

Re: problems with order by month

2018-08-21 Thread Osvaldo Ruso Olea
umno.objects.filter ( fechanacimiento __month = > now.month).order_by(‘fechanacimiento’) > > > > > > *From:* django-users@googlegroups.com [mailto: > django-users@googlegroups.com] *On Behalf Of *Osvaldo Ruso Olea > *Sent:* Monday, August 20, 2018 9:49 PM > *To:* django-users@goog

RE: problems with order by month

2018-08-21 Thread Matthew Pava
@googlegroups.com Subject: Re: problems with order by month You are a genius, thank you very much, it worked perfectly, I just made one more modification def cardio (request): now = timezone.now () cardio = Alumno.objects.filter ( fechanacimiento __month = now.month) context = {'cardio

Re: problems with order by month

2018-08-20 Thread Osvaldo Ruso Olea
You are a genius, thank you very much, it worked perfectly, I just made one more modification def cardio (request): now = timezone.now () cardio = Alumno.objects.filter ( fechanacimiento __month = now.month) context = {'cardio': cardio} return render (request, 'cardio.html',

RE: problems with order by month

2018-08-20 Thread Matthew Pava
Try this: cardio = Alumno.objects.filter(fechanacimiento__month=timezone.now().month) From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Osvaldo Ruso Olea Sent: Monday, August 20, 2018 2:58 PM To: Django users Subject: problems with order by month Hi how are