#NEWLINE# def create_revision( self , article , content = None , language = None , **kwargs ) : #NEWLINE# #INDENT# with transaction . atomic ( ) : #NEWLINE# #INDENT# with create_revision ( ) : #NEWLINE# #INDENT# for ( k , v ) in six . iteritems ( kwargs ) : #NEWLINE# #INDENT# setattr ( article , k , v ) #NEWLINE# #UNINDENT# if content : #NEWLINE# #INDENT# plugins = article . content . get_plugins ( ) #NEWLINE# plugin = plugins [ 0 ] . get_plugin_instance ( ) [ 0 ] #NEWLINE# plugin . body = content #NEWLINE# plugin . save ( ) #NEWLINE# #UNINDENT# article . save ( )