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!