Get value of related field using MAX value with annotate.

2015-11-24 Thread Grant Humphries
Having a bit of a struggle with what seems like it should be a simple issue... Essentially I have some sites where counts of objects occurred over several years: Example: site_id = Site1: (Year:2012,Count:133), (Year:2011, Count:150), (Year:2010, Count :110) site_id = Site2: (Year:2010,

Get value of related field using MAX value with annotate.

2015-11-24 Thread Grant Humphries
Having a bit of a struggle with what seems like it should be a simple issue... Essentially I have some sites where counts of objects occurred over several years: Example: site_id = Site1: (Year:2012,Count:133), (Year:2011, Count:150), (Year:2010, Count :110) site_id = Site2: (Year:2010,

Error in Tutorial?

2011-09-25 Thread Grant Humphries
I am referring to Tutorial number 3. When editing the 'polls/ index.html' file, the tutorial says to input: {% if latest_poll_list %} {% for poll in latest_poll_list %} {{ poll.question }} {% endfor %} {% else %} No polls are available. {% endif %} I input exactly