This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 43e3f7c frontend: hide unlisted projects from homepage in RSS
43e3f7c is described below
commit 43e3f7ccf8826bf052ab730718a07208482889d5
Author: Tomas Hrnciar <thrnciar(a)reedhat.com>
AuthorDate: Thu Aug 29 11:06:02 2019 +0200
frontend: hide unlisted projects from homepage in RSS
This commit removes unlisted project at homepage in RSS and
adds new RSS route /rss/all/ to show also unlisted projects.
Merges: #968
---
.../coprs_frontend/coprs/views/rss_ns/rss_general.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
b/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
index 83c9f04..0b2803b 100644
--- a/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
+++ b/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
@@ -8,9 +8,8 @@ from flask import render_template, Response
from coprs import models
-(a)rss_ns.route("/", defaults={"limit": 200})
-@rss_ns.route("/<int:limit>/")
-def rss(limit=200):
+(a)rss_ns.route("/all", defaults={"limit": 200})
+def rss_all(limit=200):
"""
Simple route that returns all projects
name, description, link to selected project
@@ -21,5 +20,18 @@ def rss(limit=200):
coprs = CoprsLogic.get_all().order_by(models.Copr.id.desc()).limit(limit)
answer = render_template("rss/rss.xml", coprs=coprs)
+ return Response(answer, mimetype="text/xml")
+
+
+(a)rss_ns.route("/", defaults={"limit": 200})
+@rss_ns.route("/<int:limit>/")
+def rss(limit=200):
+ """
+ Simple route that returns all projects
+ name, description, link to selected project
+ as rss feed except projects hidden from homepage
+ """
+ coprs =
CoprsLogic.get_multiple(include_unlisted_on_hp=False).order_by(models.Copr.id.desc()).limit(limit)
+ answer = render_template("rss/rss.xml", coprs=coprs)
return Response(answer, mimetype="text/xml")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date