'Copy all the titles to a new page (which must have a pk).
:param target: The page where the new titles should be stored'

def _copy_titles(self, target, language, published):

    from .titlemodels import Title
    old_titles = dict(target.title_set.filter(language=language).values_list('language', 'pk'))
    for title in self.title_set.filter(language=language):
        old_pk = title.pk
        title.pk = old_titles.pop(title.language, None)
        title.page = target
        title.publisher_is_draft = target.publisher_is_draft
        title.publisher_public_id = old_pk
        if published:
            title.publisher_state = PUBLISHER_STATE_DEFAULT
        else:
            title.publisher_state = PUBLISHER_STATE_PENDING
        title.published = published
        title._publisher_keep_state = True
        title.save()
        old_title = Title.objects.get(pk=old_pk)
        old_title.publisher_public = title
        old_title.publisher_state = title.publisher_state
        old_title.published = True
        old_title._publisher_keep_state = True
        old_title.save()
        if hasattr(self, 'title_cache'):
            self.title_cache[language] = old_title
    if old_titles:
        Title.objects.filter(id__in=old_titles.values()).delete()
