def pile_create(request): if request.method == "POST": create_pile_form = CreatePileForm(request.POST) if create_pile_form.is_valid(): name = create_pile_form.cleaned_data["name"] pile = Pile(name=name, is_standalone=True) pile.save() if request.is_ajax(): return utils.asyncAllPilesRefresh() return redirect("scraps_admin_manage")
def pile_delete(request, pile_id): utils.pile_delete(pile_id) if request.is_ajax(): return utils.asyncAllPilesRefresh() return redirect("scraps_admin_manage")
def scrap_repile(request, scrap_id, pile_id=None): utils.scrap_repile(scrap_id, pile_id) if request.is_ajax(): return utils.asyncAllPilesRefresh() return redirect("scraps_admin_manage")