#NEWLINE# def get( self , request ) : #NEWLINE# #INDENT# photos = Photo . objects . order_by ( '-created_date' ) [ : 20 ] #NEWLINE# years_queryset = Photo . objects . dates ( 'created_date' , 'year' ) #NEWLINE# context = { #NEWLINE# #INDENT# 'photos' : photos , #NEWLINE# 'years' : [ x . year for x in years_queryset ] , #NEWLINE# #UNINDENT# } #NEWLINE# return self . render_to_response ( self . template_name , context )