Hello, year_id (2004 etc) is a dropdown box on the template. The users selects a year and this is retrieved as year_id in the view. I need to select publications based on year from a field called grantstartdt which is in the format 2008-01-01. The error is:
int() argument must be a string or a number, not 'Year' year_id = request.GET['year_id'] yr = get_object_or_404(Year, pk=year_id) projectyr=Researchproject.objects.exclude(activeyesno = 2).filter (grantstartdt__year=yr) Thank you for any assistance! --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---