aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/views')
-rw-r--r--pyaggr3g470r/views/article.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/pyaggr3g470r/views/article.py b/pyaggr3g470r/views/article.py
index 75360485..5843551e 100644
--- a/pyaggr3g470r/views/article.py
+++ b/pyaggr3g470r/views/article.py
@@ -11,22 +11,6 @@ articles_bp = Blueprint('articles', __name__, url_prefix='/articles')
article_bp = Blueprint('article', __name__, url_prefix='/article')
-@articles_bp.route('/<feed_id>', methods=['GET'])
-@articles_bp.route('/<feed_id>/<int:nb_articles>', methods=['GET'])
-@pyagg_default_decorator
-def articles(feed_id=None, nb_articles=-1):
- """List articles of a feed. The administrator of the platform is able to
- access to this view for every users."""
- feed = controllers.FeedController(g.user.id).get(id=feed_id)
- feed.articles = controllers.ArticleController(g.user.id)\
- .read(feed_id=feed.id)\
- .order_by(desc("Article.date"))
- if len(feed.articles.all()) <= nb_articles or nb_articles == -1:
- nb_articles = int(1e9)
- feed.articles = feed.articles.limit(nb_articles)
- return render_template('articles.html', feed=feed, nb_articles=nb_articles)
-
-
@article_bp.route('/redirect/<int:article_id>', methods=['GET'])
@pyagg_default_decorator
def redirect_to_article(article_id):
bgstack15