title: Merging Django-CMS Edit and Publish Mode created two different Database entries with the same values
body: <p>My CTO asked me to fix an &quot;issue.&quot;</p>
  <p>Apparently, whenever I add any plugin in the locally run DRF-based Django CMS project, it creates two database entries. One for edit mode, and the other when I hit publish.</p>
  <p><a href="https://i.stack.imgur.com/CUbcb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CUbcb.png" alt="Database Table looks like this for a single plugin" /></a></p>
  <p>My CTO asked to find if there were <strong>any way to dynamically merge the edit mode entry with the merge mode and vice versa</strong> when switching between those modes.</p>
  <p><strong>Our website is very heavy. But is doing this even necessary for Django-CMS?</strong></p>
  <p>Here is the model.py code for an example plugin.</p>
  <p>Models.py:</p>
  <pre><code>class TechnologyVideo(ck_CMSPlugin):
      Video_thumb = models.ImageField(upload_to=&quot;technology_video&quot;, null=True, blank=True)
      video_url = models.URLField(help_text='Please enter your video url', validators=[URLValidator], null=True)
      # video_title = models.CharField(max_length=100, blank=True, null=True, )
      # video_description = HTMLField(null=True, blank=True, configuration=&quot;VIDEO_POST_TEXT_CKEDITOR&quot;)
  
      class Meta:
          verbose_name = &quot;Technology Video Model&quot;
  
      def __unicode__(self):
          return f'{self.Video_thumb}'
  </code></pre>
  <p>cms_plugins.py:</p>
  <pre><code>class TechnologyVideoPlugin(CMSPluginBase):
      model = TechnologyVideo
      name = 'Technology Video Plugin'
      render_template = 'technology_video.html'
  
      def render(self, context, instance, placeholder):
          context.update({
              'Video_thumb': instance.Video_thumb,
              'video_url': instance.video_url,
          })
          context = super(TechnologyVideoPlugin, self).render(context, instance, placeholder)
          return context
          
      plugin_pool.register_plugin(TechnologyVideoPlugin)
  </code></pre>