예제 #1
0
파일: main.py 프로젝트: sadboyyy/fatnet
def delete_news(news_id):
    if 'username' not in session:
        return redirect(
            '/login'
        )  # if user is not logged in, user will get redirected to /login
    nm = NewsModel(db.get_connection())
    nm.delete(news_id)
    return redirect("/index")
예제 #2
0
def delete_news(news_id):
    if 'username' not in session:
        return redirect('/login')
    nm = NewsModel(db.get_connection())
    nm.delete(news_id)
    return redirect("/index")
예제 #3
0
파일: main.py 프로젝트: Kaisa1906/--
def delete_news(news_id):
    nm = NewsModel(db.get_connection())
    nm.delete(news_id)
    return redirect("/news_list")