Great success with the select_related optimization.
Move the conditionals outside the loop.
Create all tokens for date strings once outside the loop.