#NEWLINE# def get_theme( themeId ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# theme = Theme . objects . get ( id = themeId ) #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'id' : theme . id , #NEWLINE# 'name' : theme . name , #NEWLINE# 'downloads' : theme . downloads , #NEWLINE# 'author' : theme . author , #NEWLINE# 'website' : theme . website , #NEWLINE# 'comment' : theme . comment , #NEWLINE# 'elements' : dict ( [ ( e [ 0 ] , gen_style ( e [ 1 ] ) ) for e in deserialize_from_lines ( theme . elements . split ( '\n' ) ) ] ) , #NEWLINE# #UNINDENT# }