示例#1
0
def article_scrap_delete(request, article_id, scrap_id, is_page=False):
    if utils.is_scrap_in_article_pile(article_id, scrap_id):
        scraps_utils.scrap_delete(scrap_id)
    utils.article_update_rendered_pile(article_id)
    if is_page:
        return redirect('articles_admin_page_edit', article_id=article_id)
    else:
        return redirect('articles_admin_article_edit', article_id=article_id)
示例#2
0
def scrap_delete(request, scrap_id):
    utils.scrap_delete(scrap_id)
    if request.is_ajax():
        return utils.asyncAllPilesRefresh()
    return redirect("scraps_admin_manage")