Cédric Bonhomme committed ce259fd

It is now possible to enable or disable (stop checking for updates) a feed.

Comments (0)

Files changed (5)


         Parse the file 'feeds.lst' and launch a thread for each RSS feed.
-        for feed in self.user.feeds:
+        for current_feed in [feed for feed in self.user.feeds if feed.enabled]:
                 # launch a new thread for the RSS feed
                 thread = threading.Thread(None, self.process, \
-                                           None, (feed, ))
+                                           None, (current_feed, ))


     link = TextField("Feed link", [validators.Required("Please enter a link for the feed.")])
     site_link = TextField("Site link", [validators.Required("Please enter a site URL.")])
     email_notification = BooleanField("Email notification", default=False)
+    enabled = BooleanField("Check for updates", default=True)
     submit = SubmitField("Save")
     def __init__(self, *args, **kwargs):


     link = StringField(required=True, unique=True)
     site_link = StringField(required=True)
     email_notification = BooleanField(default=False)
+    enabled = BooleanField(default=True)
     articles = ListField(ReferenceField('Article', dbref = False))
     created_date = DateTimeField(required=True,


             {{ form.email_notification.label }}
             {{ form.email_notification(class_="checkbox") }}
+            {{ form.enabled.label }}
+            {{ form.enabled(class_="checkbox") }}
             {{ form.submit(class_="btn") }}


             # Create a new feed
             if len([feed for feed in user.feeds if ==]) == 0:
                 new_feed = models.Feed(,, \
-                              ,
+                              ,, \
                 user.feeds = sorted(user.feeds, key=lambda t: t.title.lower())
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.