Exemplo n.º 1
0
def destraction2(request):
    if request.POST:
        if request.GET.has_key('next'):
            next = request.GET['next']
        else:
            next = ''
        for key in request.POST.keys():
            try:
                fmoper.remove(request.POST[key])
            except Exception, msg:
                return raise_error(request, [str(msg)])
            createHistory(request.user, "destraction", request.POST[key])
        if request.is_ajax():
            return json({"status": "success"})
        return HttpResponseRedirect('/fm/list/%s' % next)
Exemplo n.º 2
0
def destraction(request, path):
    path = toString(path)
    try:
        fmoper.remove(path)
    except Exception, msg:
            return raise_error(request, [str(msg)])