#NEWLINE# def response_add( self , request , obj , * args , **kwargs ) : #NEWLINE# #INDENT# response = super ( PageAdmin , self ) . response_add ( request , obj , * args , ** kwargs ) #NEWLINE# if ( ( 'parent' in request . GET ) and ( '_addanother' in request . POST ) and ( response . status_code in ( 301 , 302 ) ) ) : #NEWLINE# #INDENT# response [ 'Location' ] += ( '?parent=%s' % request . GET [ 'parent' ] ) #NEWLINE# #UNINDENT# if ( ( 'translation_of' in request . GET ) and ( '_copy_content_from_original' in request . POST ) ) : #NEWLINE# #INDENT# for content_type in obj . _feincms_content_types : #NEWLINE# #INDENT# if content_type . objects . filter ( parent = obj ) . exists ( ) : #NEWLINE# #INDENT# return response #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# original = self . model . _tree_manager . get ( pk = request . GET . get ( 'translation_of' ) ) #NEWLINE# original = original . original_translation #NEWLINE# obj . copy_content_from ( original ) #NEWLINE# obj . save ( ) #NEWLINE# self . message_user ( request , _ ( 'The content from the original translation has been copied to the newly created page.' ) ) #NEWLINE# #UNINDENT# except ( AttributeError , self . model . DoesNotExist ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# return response