Is there a cleaner way of building a list of the previous, next months than this?
Based on this answer, I would do something like :

from datetime import date
from dateutil.relativedelta import relativedelta
today = date.today()
months = [today + relativedelta(months = +i) for i in range(2,-3,-1)]


It's always better not to have to play with the dates manually as so many things can go wrong.

(I don't have access to a machine with relativedelta here so it's not tested but I'm pretty confident it should work)