From 3e8825efcf7345ad25ee664a8f401c6b723a1e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20S=C4=99kiewicz?= Date: Fri, 22 Sep 2023 11:58:09 +0200 Subject: [PATCH] transparent list of projects #493 --- scrapyd/website.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scrapyd/website.py b/scrapyd/website.py index 6bdfb44c..b875a104 100644 --- a/scrapyd/website.py +++ b/scrapyd/website.py @@ -71,7 +71,6 @@ def __init__(self, root, local_items): def render_GET(self, txrequest): vars = { - 'projects': ', '.join(self.root.scheduler.list_projects()), 'base_path': self.get_base_path(txrequest), } s = """ @@ -79,7 +78,6 @@ def render_GET(self, txrequest): Scrapyd

Scrapyd

-

Available projects: %(projects)s

+

Available projects:

+""" % vars + if self.root.scheduler.list_projects(): + s += '

' + else: + s += 'no projects' + s += """

How to schedule a spider?

To schedule a spider you need to use the API (this web UI is only for