#NEWLINE# def currencies( request ) : #NEWLINE# #INDENT# currencies = Currency . objects . active ( ) #NEWLINE# if ( not request . session . get ( 'currency' ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# currency = Currency . objects . get ( is_default__exact = True ) #NEWLINE# #UNINDENT# except Currency . DoesNotExist : #NEWLINE# #INDENT# currency = None #NEWLINE# #UNINDENT# request . session [ 'currency' ] = currency #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'CURRENCIES' : currencies , #NEWLINE# 'CURRENCY' : request . session [ 'currency' ] , #NEWLINE# #UNINDENT# }