summaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@archlinux.org>2019-10-08 15:52:38 +0200
committerjelle van der Waa <jelle@vdwaa.nl>2020-02-03 21:25:31 +0100
commit17a12f07fb04e4e3d7155be39d5e90a57d6dce61 (patch)
treedda4870fc8e0594979821914bfbeae139a3513dc /settings.py
parentb9cb1ba623a3c4f578b1616cf829d71436d1ed56 (diff)
downloadarchweb-17a12f07fb04e4e3d7155be39d5e90a57d6dce61.tar.gz
archweb-17a12f07fb04e4e3d7155be39d5e90a57d6dce61.zip
Introduce planet functionality in archweb
This change introduces a replacment for planet.archlinux.org which uses a python 2 project to generate static html from multiple RSS feed sources. For archweb a set of 'static' feeds can be created in the django admin view for the Arch forums and other static feeds, archweb users can add their own blog rss feed in their profile which will create a Feed model. When running the update_planet command, all Feed models are iterated over and the rss feed is parsed. The latest FeedItem is queried matching the current Feed model and every newer entry in the RSS feed is added as new FeedItem. Since the body is also stored in the FeedItem there is a limit to the amount of FeedItems per Feed configured in settings.py of which the default is 25. When a user is marked as inactive his Feed model and items are removed automatically to avoid keeping stale data around. Closes: #261
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/settings.py b/settings.py
index 3201f218..5a23116a 100644
--- a/settings.py
+++ b/settings.py
@@ -121,6 +121,7 @@ INSTALLED_APPS = (
'mirrors',
'news',
'packages',
+ 'planet',
'todolists',
'devel',
'public',
@@ -188,6 +189,9 @@ DATABASES = {
},
}
+# Planet limit of items per feed to keep the feed size in check.
+RSS_FEED_LIMIT = 25
+
# Import local settings
try:
from local_settings import *