Re: filter date in view.py

2009-05-30 Thread Jesse
Hello Derek, The grantstartdt field has a date format, the Year field (drop down) is a list of years in format, but the field is character. I need to parse the from the date field to match the of the Year value. When I changed the code as you suggested I received this error: da

Re: filter date in view.py

2009-05-29 Thread Derek Willis
When you use grantstartdt__year in your filter, it's looking for an integer, not an instance of your Year model, which is what you have in your view. So, assuming the pk attribute in Year is an integer, you'd change your line to something like this: projectyr=Researchproject.objects.exclude(activ