def response_add(self, request, obj, *args, **kwargs):
        response = super(PageAdmin, self).response_add(
            request, obj, *args, **kwargs)
        if ('parent' in request.GET
                and '_addanother' in request.POST
                and response.status_code in (301, 302)):
            # Preserve GET parameters if we are about to add another page
            response['Location'] += '?parent=%s' % request.GET['parent']

        if ('translation_of' in request.GET
                and '_copy_content_from_original' in request.POST):
            # Copy all contents
            for content_type in obj._feincms_content_types:
                if content_type.objects.filter(parent=obj).exists():
                    # Short-circuit processing -- don't copy any contents if
                    # newly added object already has some
                    return response

            try:
                original = self.model._tree_manager.get(
                    pk=request.GET.get('translation_of'))
                original = original.original_translation
                obj.copy_content_from(original)
                obj.save()

                self.message_user(request, _(
                    'The content from the original translation has been copied'
                    ' to the newly created page.'))
            except (__HOLE__, self.model.DoesNotExist):
                pass

        return response
dataset/ETHPy150Open feincms/feincms/feincms/module/page/modeladmins.py/PageAdmin.response_add