Use FastAPI instead of Django

This commit is contained in:
Joakim Hellsén 2024-05-21 02:43:53 +02:00
commit b462be40af
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
43 changed files with 1105 additions and 1688 deletions

View file

@ -1,26 +0,0 @@
from __future__ import annotations
from django.contrib.sitemaps import GenericSitemap
from django.urls import include, path
from feedvault.sitemaps import StaticViewSitemap
from .models import Feed
from .views import AddView, FeedsView, FeedView, IndexView, SearchView, UploadView
app_name: str = "feeds"
sitemaps = {
"static": StaticViewSitemap,
"feeds": GenericSitemap({"queryset": Feed.objects.all(), "date_field": "created_at"}),
}
urlpatterns: list = [
path(route="", view=IndexView.as_view(), name="index"),
path("__debug__/", include("debug_toolbar.urls")),
path(route="feed/<int:feed_id>/", view=FeedView.as_view(), name="feed"),
path(route="feeds/", view=FeedsView.as_view(), name="feeds"),
path(route="add/", view=AddView.as_view(), name="add"),
path(route="upload/", view=UploadView.as_view(), name="upload"),
path(route="search/", view=SearchView.as_view(), name="search"),
]