#NEWLINE# @ classmethod #NEWLINE# def set( cls , key , value ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# obj = cls . objects . get ( key = key ) #NEWLINE# obj . value = value #NEWLINE# obj . save ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# obj = cls . objects . create ( key = key , value = value )