path: root/
diff options
authorJelle van der Waa <>2019-10-08 15:52:38 +0200
committerjelle van der Waa <>2020-02-03 21:25:31 +0100
commit17a12f07fb04e4e3d7155be39d5e90a57d6dce61 (patch)
treedda4870fc8e0594979821914bfbeae139a3513dc /
parentb9cb1ba623a3c4f578b1616cf829d71436d1ed56 (diff)
Introduce planet functionality in archweb
This change introduces a replacment for 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 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 '')
1 files changed, 4 insertions, 1 deletions
diff --git a/ b/
index 44a1b0e4..c4e3992c 100644
--- a/
+++ b/
@@ -8,7 +8,7 @@ from django.conf import settings
from django.views.decorators.cache import cache_page
from django.views.generic import TemplateView
-from feeds import PackageFeed, NewsFeed, ReleaseFeed, PackageUpdatesFeed
+from feeds import PackageFeed, NewsFeed, ReleaseFeed, PackageUpdatesFeed, PlanetFeed
import sitemaps
import devel.urls
@@ -17,6 +17,7 @@ import mirrors.urls_mirrorlist
import news.urls
import packages.urls
import packages.urls_groups
+import planet.views
import public.views
import releng.urls
import todolists.urls
@@ -48,6 +49,7 @@ urlpatterns.extend([
url(r'^master-keys/$', public.views.keys, name='page-keys'),
url(r'^master-keys/json/$', public.views.keys_json, name='pgp-keys-json'),
url(r'^people/(?P<slug>[-\w]+)/$', public.views.people, name='people'),
+ url(r'^planet/$', planet.views.index, name='planet'),
# Feeds patterns, used below
@@ -63,6 +65,7 @@ feeds_patterns = [
url(r'^packages/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
url(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
url(r'^releases/$', cache_page(317)(ReleaseFeed())),
+ url(r'^planet/$', cache_page(317)(PlanetFeed()), name='planet-feed'),
# Includes and other remaining stuff