#NEWLINE# def new_document_pages_per_month( ) : #NEWLINE# #INDENT# qss = qsstats . QuerySetStats ( DocumentPage . objects . all ( ) , 'document_version__document__date_added' ) #NEWLINE# today = datetime . date . today ( ) #NEWLINE# this_year = datetime . date ( year = today . year , month = 1 , day = 1 ) #NEWLINE# return { #NEWLINE# #INDENT# 'series' : { #NEWLINE# #INDENT# 'Pages' : map ( ( lambda x : { #NEWLINE# #INDENT# x [ 0 ] . month : x [ 1 ] , #NEWLINE# #UNINDENT# } ) , qss . time_series ( start = this_year , end = today , interval = 'months' ) ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# }