#NEWLINE# def get( self , request , aslug ) : #NEWLINE# #INDENT# album = get_object_or_404 ( Album , slug = aslug ) #NEWLINE# photos = album . photos . all ( ) . order_by ( '-created_date' ) #NEWLINE# years_queryset = photos . dates ( 'created_date' , 'year' ) #NEWLINE# context = { #NEWLINE# #INDENT# 'album' : album , #NEWLINE# 'photos' : photos , #NEWLINE# 'years' : [ x . year for x in years_queryset ] , #NEWLINE# #UNINDENT# } #NEWLINE# return self . render_to_response ( self . template_name , context )