2026-03-16 19:19:22 +01:00
|
|
|
from django.conf import settings
|
|
|
|
|
from django.conf.urls.static import static
|
|
|
|
|
from django.contrib import admin
|
|
|
|
|
from django.urls import path, include
|
2026-08-14 23:31:01 +02:00
|
|
|
from django.views.static import serve as serve_static
|
2026-03-16 19:19:22 +01:00
|
|
|
|
2026-08-15 16:20:54 +02:00
|
|
|
from accounts.sync import sync_snapshot
|
|
|
|
|
|
2026-03-16 19:19:22 +01:00
|
|
|
urlpatterns = [
|
|
|
|
|
path('admin/', admin.site.urls),
|
|
|
|
|
path('accounts/', include('accounts.urls')),
|
2026-03-19 13:39:59 +01:00
|
|
|
path('podcasts/', include('podcasts.urls')),
|
|
|
|
|
path('books/', include('books.urls')),
|
Feed-Reader (Server): Nachrichten und Blogs, Volltext, Meldungen bündeln
Neue App feeds: Quellen sind entweder Nachrichten oder Blog.
- Abruf wie bei Podcasts (ETag, Body-Hash, Backoff), refresh_newsfeeds für den Cron
- Anrisstexte: der Artikel wird von der Seite geholt (trafilatura), HTML bereinigt,
relative Links absolut
- Nachrichten: gleiche Meldung aus mehreren Quellen wird eine Story (tf-idf, je
Artikel verglichen), Briefing „Seit letztem Mal“ (Top-Themen, dann nach Ressort),
verfallen nach news_keep_days (Standard 2)
- Blogs: Ungelesen-Liste je Blog, bleiben bis gelesen
- API unter /feeds/: Quellen suchen/abonnieren/OPML, News, Stories, Blogs,
Artikel, gelesen, merken
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 19:57:23 +02:00
|
|
|
path('feeds/', include('feeds.urls')),
|
2026-08-31 22:29:13 +02:00
|
|
|
path('tts/', include('tts.urls')),
|
2026-03-20 06:36:41 +01:00
|
|
|
path('api/2/', include('gpodder.urls')),
|
2026-08-15 16:20:54 +02:00
|
|
|
path('api/sync/', sync_snapshot, name='api_sync'),
|
2026-08-14 23:31:01 +02:00
|
|
|
# Served at the root (not /static/js/sw.js) so its default scope covers
|
|
|
|
|
# the whole app — a service worker's scope is limited to its own script's
|
|
|
|
|
# directory unless the server sends Service-Worker-Allowed, so registering
|
|
|
|
|
# it from under /static/js/ silently restricted it to that subpath and
|
|
|
|
|
# navigations to '/', '/books/' etc. were never intercepted while offline.
|
|
|
|
|
path('sw.js', serve_static, {'document_root': settings.BASE_DIR / 'static' / 'js', 'path': 'sw.js'}),
|
2026-03-16 19:19:22 +01:00
|
|
|
path('', include('radio.urls')),
|
|
|
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|