Use FastAPI instead of Django
This commit is contained in:
parent
bfe90aa69d
commit
b462be40af
43 changed files with 1105 additions and 1688 deletions
|
|
@ -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"),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue