#NEWLINE# @ register . filter #NEWLINE# def add_days( date , days = 1 ) : #NEWLINE# #INDENT# 'Return a date with some days added' #NEWLINE# span = timedelta ( days = days ) #NEWLINE# try : #NEWLINE# #INDENT# return ( date + span ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return ( datetime . strptime ( date , '%m/%d/%Y' ) . date ( ) + span )