def add_article (article, feed): if Article.added(article): return None article.feed_id = feed.id db.session.add(article) db.session.commit() return (article)
def remove_article (article): if not Article.added(article): return db.session.delete(article) db.session.commit()