> today = datetime.date.today() > context[self.varname] = GpUser.objects.filter(birthday=today) > > The problem is, that will never evaluate to true, because I still have > today's year. So, how does one throw out the year and just compare > month and day?
Well, the Django ORM handles something like gpusers = GpUser.objects.filter( birthday__month = today.month, birthday__day = today.day ) which should do the trick. You can read more at: http://www.djangoproject.com/documentation/db-api/#month http://www.djangoproject.com/documentation/db-api/#day http://docs.python.org/lib/datetime-date.html -tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---