Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/f/e/FeinCMS-1.9.3/feincms/admin/tree_editor.py   FeinCMS(Download)
 
        if not self.has_change_permission(request, cut_item):
            self.message_user(request, _('No permission'))
            return HttpResponse('FAIL')
 
        if position in ('last-child', 'left', 'right'):
            try:
                tree_manager.move_node(cut_item, pasted_on, position)
            except InvalidMove as e:
                self.message_user(request, '%s' % e)
 
            self.message_user(
                request,
                ugettext('%s has been moved to a new position.') % cut_item)
            return HttpResponse('OK')
 
        self.message_user(request, _('Did not understand moving instruction.'))
                        request.user, obj.id)
            self.message_user(
                request,
                _("Successfully deleted %(count)d items.") % {"count": n})
            # Return None to display the change list page again

src/f/e/feincms-HEAD/feincms/admin/tree_editor.py   feincms(Download)
 
        if not self.has_change_permission(request, cut_item):
            self.message_user(request, _('No permission'))
            return HttpResponse('FAIL')
 
        if position in ('last-child', 'left', 'right'):
            try:
                tree_manager.move_node(cut_item, pasted_on, position)
            except InvalidMove as e:
                self.message_user(request, '%s' % e)
 
            self.message_user(
                request,
                ugettext('%s has been moved to a new position.') % cut_item)
            return HttpResponse('OK')
 
        self.message_user(request, _('Did not understand moving instruction.'))
                        request.user, obj.id)
            self.message_user(
                request,
                _("Successfully deleted %(count)d items.") % {"count": n})
            # Return None to display the change list page again