Improve feed explenation; add link to templates
This commit is contained in:
parent
92ca0404a6
commit
768e6f2111
19 changed files with 200 additions and 279 deletions
58
core/urls.py
58
core/urls.py
|
|
@ -2,9 +2,27 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from django.urls import path
|
||||
|
||||
from core import views
|
||||
from core.views import dashboard
|
||||
from core.views import dataset_backup_download_view
|
||||
from core.views import dataset_backups_view
|
||||
from core.views import debug_view
|
||||
from core.views import docs_rss_view
|
||||
from core.views import search_view
|
||||
from twitch.feeds import DropCampaignAtomFeed
|
||||
from twitch.feeds import DropCampaignDiscordFeed
|
||||
from twitch.feeds import DropCampaignFeed
|
||||
from twitch.feeds import GameAtomFeed
|
||||
from twitch.feeds import GameCampaignAtomFeed
|
||||
from twitch.feeds import GameCampaignDiscordFeed
|
||||
from twitch.feeds import GameCampaignFeed
|
||||
from twitch.feeds import GameDiscordFeed
|
||||
from twitch.feeds import GameFeed
|
||||
from twitch.feeds import OrganizationAtomFeed
|
||||
from twitch.feeds import OrganizationDiscordFeed
|
||||
from twitch.feeds import OrganizationRSSFeed
|
||||
from twitch.feeds import RewardCampaignAtomFeed
|
||||
from twitch.feeds import RewardCampaignDiscordFeed
|
||||
from twitch.feeds import RewardCampaignFeed
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.urls.resolvers import URLPattern
|
||||
|
|
@ -15,21 +33,21 @@ app_name = "core"
|
|||
|
||||
urlpatterns: list[URLPattern | URLResolver] = [
|
||||
# /
|
||||
path("", views.dashboard, name="dashboard"),
|
||||
path("", dashboard, name="dashboard"),
|
||||
# /search/
|
||||
path("search/", views.search_view, name="search"),
|
||||
path("search/", search_view, name="search"),
|
||||
# /debug/
|
||||
path("debug/", views.debug_view, name="debug"),
|
||||
path("debug/", debug_view, name="debug"),
|
||||
# /datasets/
|
||||
path("datasets/", views.dataset_backups_view, name="dataset_backups"),
|
||||
path("datasets/", dataset_backups_view, name="dataset_backups"),
|
||||
# /datasets/download/<relative_path>/
|
||||
path(
|
||||
"datasets/download/<path:relative_path>/",
|
||||
views.dataset_backup_download_view,
|
||||
dataset_backup_download_view,
|
||||
name="dataset_backup_download",
|
||||
),
|
||||
# /docs/rss/
|
||||
path("docs/rss/", views.docs_rss_view, name="docs_rss"),
|
||||
path("docs/rss/", docs_rss_view, name="docs_rss"),
|
||||
# RSS feeds
|
||||
# /rss/campaigns/ - all active campaigns
|
||||
path("rss/campaigns/", DropCampaignFeed(), name="campaign_feed"),
|
||||
|
|
@ -38,59 +56,59 @@ urlpatterns: list[URLPattern | URLResolver] = [
|
|||
# /rss/games/<twitch_id>/campaigns/ - active campaigns for a specific game
|
||||
path(
|
||||
"rss/games/<str:twitch_id>/campaigns/",
|
||||
views.GameCampaignFeed(),
|
||||
GameCampaignFeed(),
|
||||
name="game_campaign_feed",
|
||||
),
|
||||
# /rss/organizations/ - newly added organizations
|
||||
path(
|
||||
"rss/organizations/",
|
||||
views.OrganizationRSSFeed(),
|
||||
OrganizationRSSFeed(),
|
||||
name="organization_feed",
|
||||
),
|
||||
# /rss/reward-campaigns/ - all active reward campaigns
|
||||
path(
|
||||
"rss/reward-campaigns/",
|
||||
views.RewardCampaignFeed(),
|
||||
RewardCampaignFeed(),
|
||||
name="reward_campaign_feed",
|
||||
),
|
||||
# Atom feeds (added alongside RSS to preserve backward compatibility)
|
||||
path("atom/campaigns/", views.DropCampaignAtomFeed(), name="campaign_feed_atom"),
|
||||
path("atom/games/", views.GameAtomFeed(), name="game_feed_atom"),
|
||||
path("atom/campaigns/", DropCampaignAtomFeed(), name="campaign_feed_atom"),
|
||||
path("atom/games/", GameAtomFeed(), name="game_feed_atom"),
|
||||
path(
|
||||
"atom/games/<str:twitch_id>/campaigns/",
|
||||
views.GameCampaignAtomFeed(),
|
||||
view=GameCampaignAtomFeed(),
|
||||
name="game_campaign_feed_atom",
|
||||
),
|
||||
path(
|
||||
"atom/organizations/",
|
||||
views.OrganizationAtomFeed(),
|
||||
OrganizationAtomFeed(),
|
||||
name="organization_feed_atom",
|
||||
),
|
||||
path(
|
||||
"atom/reward-campaigns/",
|
||||
views.RewardCampaignAtomFeed(),
|
||||
RewardCampaignAtomFeed(),
|
||||
name="reward_campaign_feed_atom",
|
||||
),
|
||||
# Discord feeds (Atom feeds with Discord relative timestamps)
|
||||
path(
|
||||
"discord/campaigns/",
|
||||
views.DropCampaignDiscordFeed(),
|
||||
DropCampaignDiscordFeed(),
|
||||
name="campaign_feed_discord",
|
||||
),
|
||||
path("discord/games/", views.GameDiscordFeed(), name="game_feed_discord"),
|
||||
path("discord/games/", GameDiscordFeed(), name="game_feed_discord"),
|
||||
path(
|
||||
"discord/games/<str:twitch_id>/campaigns/",
|
||||
views.GameCampaignDiscordFeed(),
|
||||
GameCampaignDiscordFeed(),
|
||||
name="game_campaign_feed_discord",
|
||||
),
|
||||
path(
|
||||
"discord/organizations/",
|
||||
views.OrganizationDiscordFeed(),
|
||||
OrganizationDiscordFeed(),
|
||||
name="organization_feed_discord",
|
||||
),
|
||||
path(
|
||||
"discord/reward-campaigns/",
|
||||
views.RewardCampaignDiscordFeed(),
|
||||
RewardCampaignDiscordFeed(),
|
||||
name="reward_campaign_feed_discord",
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue