<s> from cms . models import CMSPlugin <EOL> from cms . models . fields import PlaceholderField <EOL> from cms . utils . copy_plugins import copy_plugins_to <EOL> from django . db import models <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> @ python_2_unicode_compatible <EOL> class PlaceholderReference ( CMSPlugin ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> placeholder_ref = PlaceholderField ( slotname = '<STR_LIT>' ) <EOL> class Meta : <EOL> app_label = '<STR_LIT>' <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> def copy_to ( self , placeholder , language ) : <EOL> copy_plugins_to ( self . placeholder_ref . get_plugins ( ) , placeholder , to_language = language ) <EOL> def copy_from ( self , placeholder , language ) : <EOL> copy_plugins_to ( placeholder . get_plugins ( language ) , self . placeholder_ref , to_language = self . language ) <EOL> def move_to ( self , placeholder , language ) : <EOL> for plugin in self . placeholder_ref . get_plugins ( ) : <EOL> plugin . placeholder = placeholder <EOL> plugin . language = language <EOL> plugin . save ( ) <EOL> def move_from ( self , placeholder , language ) : <EOL> for plugin in placeholder . get_plugins ( ) : <EOL> plugin . placeholder = self . placeholder_ref <EOL> plugin . language = language <EOL> plugin . save ( ) </s>
